Решение на Четвърта задача от Адриана Стефанова
Обратно към всички решения
Към профила на Адриана Стефанова
Резултати
- 5 точки от тестове
- 1 отнета точка
- 4 точки общо
- 48 успешни тест(а)
- 9 неуспешни тест(а)
Код
Лог от изпълнението
.................F.........FF.F......F.F.F..F.........F..
Failures:
1) BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: expect(deck.to_a).to match_array all_available_cards
expected collection contained: [#<Card:0x007faf34309810 @rank=:ace, @suit=:spades>, #<Card:0x007faf343098b0 @rank=:king, @suit=:spades>, #<Card:0x007faf34309928 @rank=:queen, @suit=:spades>, #<Card:0x007faf34309978 @rank=:jack, @suit=:spades>, #<Card:0x007faf34309860 @rank=10, @suit=:spades>, #<Card:0x007faf343099f0 @rank=9, @suit=:spades>, #<Card:0x007faf34309a40 @rank=8, @suit=:spades>, #<Card:0x007faf34309a90 @rank=7, @suit=:spades>, #<Card:0x007faf34309ae0 @rank=:ace, @suit=:hearts>, #<Card:0x007faf34309b80 @rank=:king, @suit=:hearts>, #<Card:0x007faf34309bd0 @rank=:queen, @suit=:hearts>, #<Card:0x007faf34309c20 @rank=:jack, @suit=:hearts>, #<Card:0x007faf34309b30 @rank=10, @suit=:hearts>, #<Card:0x007faf34309c70 @rank=9, @suit=:hearts>, #<Card:0x007faf34309cc0 @rank=8, @suit=:hearts>, #<Card:0x007faf34309d10 @rank=7, @suit=:hearts>, #<Card:0x007faf34309db0 @rank=:ace, @suit=:diamonds>, #<Card:0x007faf34309e50 @rank=:king, @suit=:diamonds>, #<Card:0x007faf34309ea0 @rank=:queen, @suit=:diamonds>, #<Card:0x007faf34309ef0 @rank=:jack, @suit=:diamonds>, #<Card:0x007faf34309e00 @rank=10, @suit=:diamonds>, #<Card:0x007faf34309f40 @rank=9, @suit=:diamonds>, #<Card:0x007faf34309f90 @rank=8, @suit=:diamonds>, #<Card:0x007faf3430a008 @rank=7, @suit=:diamonds>, #<Card:0x007faf3430a058 @rank=:ace, @suit=:clubs>, #<Card:0x007faf3430a0f8 @rank=:king, @suit=:clubs>, #<Card:0x007faf3430a170 @rank=:queen, @suit=:clubs>, #<Card:0x007faf3430a1c0 @rank=:jack, @suit=:clubs>, #<Card:0x007faf3430a0a8 @rank=10, @suit=:clubs>, #<Card:0x007faf3430a2d8 @rank=9, @suit=:clubs>, #<Card:0x007faf3430a328 @rank=8, @suit=:clubs>, #<Card:0x007faf3430a3a0 @rank=7, @suit=:clubs>]
actual collection contained: [#<BeloteCard:0x007faf343197d8 @rank=:ace, @suit=:spades>, #<BeloteCard:0x007faf34319918 @rank=10, @suit=:spades>, #<BeloteCard:0x007faf343199e0 @rank=:king, @suit=:spades>, #<BeloteCard:0x007faf34319b70 @rank=:queen, @suit=:spades>, #<BeloteCard:0x007faf34319d28 @rank=:jack, @suit=:spades>, #<BeloteCard:0x007faf34319e18 @rank=9, @suit=:spades>, #<BeloteCard:0x007faf34319fd0 @rank=8, @suit=:spades>, #<BeloteCard:0x007faf3431a390 @rank=7, @suit=:spades>, #<BeloteCard:0x007faf34318978 @rank=:ace, @suit=:hearts>, #<BeloteCard:0x007faf34318a68 @rank=10, @suit=:hearts>, #<BeloteCard:0x007faf34318c70 @rank=:king, @suit=:hearts>, #<BeloteCard:0x007faf34318e28 @rank=:queen, @suit=:hearts>, #<BeloteCard:0x007faf34318f18 @rank=:jack, @suit=:hearts>, #<BeloteCard:0x007faf34319120 @rank=9, @suit=:hearts>, #<BeloteCard:0x007faf343192d8 @rank=8, @suit=:hearts>, #<BeloteCard:0x007faf34319440 @rank=7, @suit=:hearts>, #<BeloteCard:0x007faf3430bae8 @rank=:ace, @suit=:diamonds>, #<BeloteCard:0x007faf3430bbb0 @rank=10, @suit=:diamonds>, #<BeloteCard:0x007faf3430bd90 @rank=:king, @suit=:diamonds>, #<BeloteCard:0x007faf34318b30 @rank=:queen, @suit=:diamonds>, #<BeloteCard:0x007faf343180e0 @rank=:jack, @suit=:diamonds>, #<BeloteCard:0x007faf34318478 @rank=9, @suit=:diamonds>, #<BeloteCard:0x007faf34318568 @rank=8, @suit=:diamonds>, #<BeloteCard:0x007faf34318630 @rank=7, @suit=:diamonds>, #<BeloteCard:0x007faf3430ad28 @rank=:ace, @suit=:clubs>, #<BeloteCard:0x007faf3430aee0 @rank=10, @suit=:clubs>, #<BeloteCard:0x007faf3430afa8 @rank=:king, @suit=:clubs>, #<BeloteCard:0x007faf3430b070 @rank=:queen, @suit=:clubs>, #<BeloteCard:0x007faf3430b228 @rank=:jack, @suit=:clubs>, #<BeloteCard:0x007faf3430b318 @rank=9, @suit=:clubs>, #<BeloteCard:0x007faf3430b480 @rank=8, @suit=:clubs>, #<BeloteCard:0x007faf3430b6d8 @rank=7, @suit=:clubs>]
the missing elements were: [#<Card:0x007faf34309810 @rank=:ace, @suit=:spades>, #<Card:0x007faf343098b0 @rank=:king, @suit=:spades>, #<Card:0x007faf34309928 @rank=:queen, @suit=:spades>, #<Card:0x007faf34309978 @rank=:jack, @suit=:spades>, #<Card:0x007faf34309860 @rank=10, @suit=:spades>, #<Card:0x007faf343099f0 @rank=9, @suit=:spades>, #<Card:0x007faf34309a40 @rank=8, @suit=:spades>, #<Card:0x007faf34309a90 @rank=7, @suit=:spades>, #<Card:0x007faf34309ae0 @rank=:ace, @suit=:hearts>, #<Card:0x007faf34309b80 @rank=:king, @suit=:hearts>, #<Card:0x007faf34309bd0 @rank=:queen, @suit=:hearts>, #<Card:0x007faf34309c20 @rank=:jack, @suit=:hearts>, #<Card:0x007faf34309b30 @rank=10, @suit=:hearts>, #<Card:0x007faf34309c70 @rank=9, @suit=:hearts>, #<Card:0x007faf34309cc0 @rank=8, @suit=:hearts>, #<Card:0x007faf34309d10 @rank=7, @suit=:hearts>, #<Card:0x007faf34309db0 @rank=:ace, @suit=:diamonds>, #<Card:0x007faf34309e50 @rank=:king, @suit=:diamonds>, #<Card:0x007faf34309ea0 @rank=:queen, @suit=:diamonds>, #<Card:0x007faf34309ef0 @rank=:jack, @suit=:diamonds>, #<Card:0x007faf34309e00 @rank=10, @suit=:diamonds>, #<Card:0x007faf34309f40 @rank=9, @suit=:diamonds>, #<Card:0x007faf34309f90 @rank=8, @suit=:diamonds>, #<Card:0x007faf3430a008 @rank=7, @suit=:diamonds>, #<Card:0x007faf3430a058 @rank=:ace, @suit=:clubs>, #<Card:0x007faf3430a0f8 @rank=:king, @suit=:clubs>, #<Card:0x007faf3430a170 @rank=:queen, @suit=:clubs>, #<Card:0x007faf3430a1c0 @rank=:jack, @suit=:clubs>, #<Card:0x007faf3430a0a8 @rank=10, @suit=:clubs>, #<Card:0x007faf3430a2d8 @rank=9, @suit=:clubs>, #<Card:0x007faf3430a328 @rank=8, @suit=:clubs>, #<Card:0x007faf3430a3a0 @rank=7, @suit=:clubs>]
the extra elements were: [#<BeloteCard:0x007faf343197d8 @rank=:ace, @suit=:spades>, #<BeloteCard:0x007faf34319918 @rank=10, @suit=:spades>, #<BeloteCard:0x007faf343199e0 @rank=:king, @suit=:spades>, #<BeloteCard:0x007faf34319b70 @rank=:queen, @suit=:spades>, #<BeloteCard:0x007faf34319d28 @rank=:jack, @suit=:spades>, #<BeloteCard:0x007faf34319e18 @rank=9, @suit=:spades>, #<BeloteCard:0x007faf34319fd0 @rank=8, @suit=:spades>, #<BeloteCard:0x007faf3431a390 @rank=7, @suit=:spades>, #<BeloteCard:0x007faf34318978 @rank=:ace, @suit=:hearts>, #<BeloteCard:0x007faf34318a68 @rank=10, @suit=:hearts>, #<BeloteCard:0x007faf34318c70 @rank=:king, @suit=:hearts>, #<BeloteCard:0x007faf34318e28 @rank=:queen, @suit=:hearts>, #<BeloteCard:0x007faf34318f18 @rank=:jack, @suit=:hearts>, #<BeloteCard:0x007faf34319120 @rank=9, @suit=:hearts>, #<BeloteCard:0x007faf343192d8 @rank=8, @suit=:hearts>, #<BeloteCard:0x007faf34319440 @rank=7, @suit=:hearts>, #<BeloteCard:0x007faf3430bae8 @rank=:ace, @suit=:diamonds>, #<BeloteCard:0x007faf3430bbb0 @rank=10, @suit=:diamonds>, #<BeloteCard:0x007faf3430bd90 @rank=:king, @suit=:diamonds>, #<BeloteCard:0x007faf34318b30 @rank=:queen, @suit=:diamonds>, #<BeloteCard:0x007faf343180e0 @rank=:jack, @suit=:diamonds>, #<BeloteCard:0x007faf34318478 @rank=9, @suit=:diamonds>, #<BeloteCard:0x007faf34318568 @rank=8, @suit=:diamonds>, #<BeloteCard:0x007faf34318630 @rank=7, @suit=:diamonds>, #<BeloteCard:0x007faf3430ad28 @rank=:ace, @suit=:clubs>, #<BeloteCard:0x007faf3430aee0 @rank=10, @suit=:clubs>, #<BeloteCard:0x007faf3430afa8 @rank=:king, @suit=:clubs>, #<BeloteCard:0x007faf3430b070 @rank=:queen, @suit=:clubs>, #<BeloteCard:0x007faf3430b228 @rank=:jack, @suit=:clubs>, #<BeloteCard:0x007faf3430b318 @rank=9, @suit=:clubs>, #<BeloteCard:0x007faf3430b480 @rank=8, @suit=:clubs>, #<BeloteCard:0x007faf3430b6d8 @rank=7, @suit=:clubs>]
Shared Example Group: "a deck" called from /tmp/d20151112-27349-5h228p/spec.rb:191
# /tmp/d20151112-27349-5h228p/spec.rb:18:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
Failure/Error: expect(hand.highest_of_suit(:spades)).to eq Card.new(:king, :spades)
expected: #<Card:0x007faf3421c290 @rank=:king, @suit=:spades>
got: #<Card:0x007faf3421e130 @rank=:ace, @suit=:clubs>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007faf3421c290 @rank=:king, @suit=:spades>
+#<Card:0x007faf3421e130 @rank=:ace, @suit=:clubs>
# /tmp/d20151112-27349-5h228p/spec.rb:233:in `block (4 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
Failure/Error: expect(hand.belote?).to be true
expected #<TrueClass:20> => true
got #<FalseClass:0> => false
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
# /tmp/d20151112-27349-5h228p/spec.rb:251:in `block (4 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) BeloteDeck hand #tierce? with tierce returns true for cards with names
Failure/Error: expect(hand.tierce?).to be true
expected #<TrueClass:20> => true
got #<FalseClass:0> => false
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
# /tmp/d20151112-27349-5h228p/spec.rb:284:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
5) BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
Failure/Error: expect(hand.public_send(method)).to be true
expected #<TrueClass:20> => true
got #<FalseClass:0> => false
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-5h228p/spec.rb:386
# /tmp/d20151112-27349-5h228p/spec.rb:86:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
6) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
Failure/Error: expect(hand.public_send(method)).to be true
expected #<TrueClass:20> => true
got #<FalseClass:0> => false
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-5h228p/spec.rb:390
# /tmp/d20151112-27349-5h228p/spec.rb:86:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
7) BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
Failure/Error: expect(hand.public_send(method)).to be true
expected #<TrueClass:20> => true
got #<FalseClass:0> => false
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-5h228p/spec.rb:394
# /tmp/d20151112-27349-5h228p/spec.rb:86:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
8) SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: expect(deck.to_a).to match_array all_available_cards
expected collection contained: [#<Card:0x007faf33eb6b28 @rank=:ace, @suit=:spades>, #<Card:0x007faf33eb6c40 @rank=:king, @suit=:spades>, #<Card:0x007faf33eb6ce0 @rank=:queen, @suit=:spades>, #<Card:0x007faf33eb6d80 @rank=:jack, @suit=:spades>, #<Card:0x007faf33eb6b78 @rank=10, @suit=:spades>, #<Card:0x007faf33eb6ee8 @rank=9, @suit=:spades>, #<Card:0x007faf33eb6fb0 @rank=:ace, @suit=:hearts>, #<Card:0x007faf33eb70f0 @rank=:king, @suit=:hearts>, #<Card:0x007faf33eb7190 @rank=:queen, @suit=:hearts>, #<Card:0x007faf33eb7230 @rank=:jack, @suit=:hearts>, #<Card:0x007faf33eb7050 @rank=10, @suit=:hearts>, #<Card:0x007faf33eb7370 @rank=9, @suit=:hearts>, #<Card:0x007faf33eb7410 @rank=:ace, @suit=:diamonds>, #<Card:0x007faf33eb7578 @rank=:king, @suit=:diamonds>, #<Card:0x007faf33eb7618 @rank=:queen, @suit=:diamonds>, #<Card:0x007faf33eb7668 @rank=:jack, @suit=:diamonds>, #<Card:0x007faf33eb7488 @rank=10, @suit=:diamonds>, #<Card:0x007faf33eb77d0 @rank=9, @suit=:diamonds>, #<Card:0x007faf33eb7820 @rank=:ace, @suit=:clubs>, #<Card:0x007faf33eb7960 @rank=:king, @suit=:clubs>, #<Card:0x007faf33eb79d8 @rank=:queen, @suit=:clubs>, #<Card:0x007faf33eb7a78 @rank=:jack, @suit=:clubs>, #<Card:0x007faf33eb78e8 @rank=10, @suit=:clubs>, #<Card:0x007faf33eb7b40 @rank=9, @suit=:clubs>]
actual collection contained: [#<SixtySixCard:0x007faf33ed44e8 @rank=:ace, @suit=:spades>, #<SixtySixCard:0x007faf33ed46a0 @rank=10, @suit=:spades>, #<SixtySixCard:0x007faf33ed47e0 @rank=:king, @suit=:spades>, #<SixtySixCard:0x007faf33ed48f8 @rank=:queen, @suit=:spades>, #<SixtySixCard:0x007faf33ed4a10 @rank=:jack, @suit=:spades>, #<SixtySixCard:0x007faf33ed4b78 @rank=9, @suit=:spades>, #<SixtySixCard:0x007faf33ecbb18 @rank=:ace, @suit=:hearts>, #<SixtySixCard:0x007faf33ecbe88 @rank=10, @suit=:hearts>, #<SixtySixCard:0x007faf33ed6fb8 @rank=:king, @suit=:hearts>, #<SixtySixCard:0x007faf33ed4100 @rank=:queen, @suit=:hearts>, #<SixtySixCard:0x007faf33ed4218 @rank=:jack, @suit=:hearts>, #<SixtySixCard:0x007faf33ed4330 @rank=9, @suit=:hearts>, #<SixtySixCard:0x007faf33ec97f0 @rank=:ace, @suit=:diamonds>, #<SixtySixCard:0x007faf33ec9d90 @rank=10, @suit=:diamonds>, #<SixtySixCard:0x007faf33eca768 @rank=:king, @suit=:diamonds>, #<SixtySixCard:0x007faf33ecab50 @rank=:queen, @suit=:diamonds>, #<SixtySixCard:0x007faf33ecb230 @rank=:jack, @suit=:diamonds>, #<SixtySixCard:0x007faf33ecb460 @rank=9, @suit=:diamonds>, #<SixtySixCard:0x007faf33ec84b8 @rank=:ace, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8648 @rank=10, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8940 @rank=:king, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8b70 @rank=:queen, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8da0 @rank=:jack, @suit=:clubs>, #<SixtySixCard:0x007faf33ec9188 @rank=9, @suit=:clubs>]
the missing elements were: [#<Card:0x007faf33eb6b28 @rank=:ace, @suit=:spades>, #<Card:0x007faf33eb6c40 @rank=:king, @suit=:spades>, #<Card:0x007faf33eb6ce0 @rank=:queen, @suit=:spades>, #<Card:0x007faf33eb6d80 @rank=:jack, @suit=:spades>, #<Card:0x007faf33eb6b78 @rank=10, @suit=:spades>, #<Card:0x007faf33eb6ee8 @rank=9, @suit=:spades>, #<Card:0x007faf33eb6fb0 @rank=:ace, @suit=:hearts>, #<Card:0x007faf33eb70f0 @rank=:king, @suit=:hearts>, #<Card:0x007faf33eb7190 @rank=:queen, @suit=:hearts>, #<Card:0x007faf33eb7230 @rank=:jack, @suit=:hearts>, #<Card:0x007faf33eb7050 @rank=10, @suit=:hearts>, #<Card:0x007faf33eb7370 @rank=9, @suit=:hearts>, #<Card:0x007faf33eb7410 @rank=:ace, @suit=:diamonds>, #<Card:0x007faf33eb7578 @rank=:king, @suit=:diamonds>, #<Card:0x007faf33eb7618 @rank=:queen, @suit=:diamonds>, #<Card:0x007faf33eb7668 @rank=:jack, @suit=:diamonds>, #<Card:0x007faf33eb7488 @rank=10, @suit=:diamonds>, #<Card:0x007faf33eb77d0 @rank=9, @suit=:diamonds>, #<Card:0x007faf33eb7820 @rank=:ace, @suit=:clubs>, #<Card:0x007faf33eb7960 @rank=:king, @suit=:clubs>, #<Card:0x007faf33eb79d8 @rank=:queen, @suit=:clubs>, #<Card:0x007faf33eb7a78 @rank=:jack, @suit=:clubs>, #<Card:0x007faf33eb78e8 @rank=10, @suit=:clubs>, #<Card:0x007faf33eb7b40 @rank=9, @suit=:clubs>]
the extra elements were: [#<SixtySixCard:0x007faf33ed44e8 @rank=:ace, @suit=:spades>, #<SixtySixCard:0x007faf33ed46a0 @rank=10, @suit=:spades>, #<SixtySixCard:0x007faf33ed47e0 @rank=:king, @suit=:spades>, #<SixtySixCard:0x007faf33ed48f8 @rank=:queen, @suit=:spades>, #<SixtySixCard:0x007faf33ed4a10 @rank=:jack, @suit=:spades>, #<SixtySixCard:0x007faf33ed4b78 @rank=9, @suit=:spades>, #<SixtySixCard:0x007faf33ecbb18 @rank=:ace, @suit=:hearts>, #<SixtySixCard:0x007faf33ecbe88 @rank=10, @suit=:hearts>, #<SixtySixCard:0x007faf33ed6fb8 @rank=:king, @suit=:hearts>, #<SixtySixCard:0x007faf33ed4100 @rank=:queen, @suit=:hearts>, #<SixtySixCard:0x007faf33ed4218 @rank=:jack, @suit=:hearts>, #<SixtySixCard:0x007faf33ed4330 @rank=9, @suit=:hearts>, #<SixtySixCard:0x007faf33ec97f0 @rank=:ace, @suit=:diamonds>, #<SixtySixCard:0x007faf33ec9d90 @rank=10, @suit=:diamonds>, #<SixtySixCard:0x007faf33eca768 @rank=:king, @suit=:diamonds>, #<SixtySixCard:0x007faf33ecab50 @rank=:queen, @suit=:diamonds>, #<SixtySixCard:0x007faf33ecb230 @rank=:jack, @suit=:diamonds>, #<SixtySixCard:0x007faf33ecb460 @rank=9, @suit=:diamonds>, #<SixtySixCard:0x007faf33ec84b8 @rank=:ace, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8648 @rank=10, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8940 @rank=:king, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8b70 @rank=:queen, @suit=:clubs>, #<SixtySixCard:0x007faf33ec8da0 @rank=:jack, @suit=:clubs>, #<SixtySixCard:0x007faf33ec9188 @rank=9, @suit=:clubs>]
Shared Example Group: "a deck" called from /tmp/d20151112-27349-5h228p/spec.rb:400
# /tmp/d20151112-27349-5h228p/spec.rb:18:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
9) SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
Failure/Error: expect(hand.twenty?(:hearts)).to be true
expected #<TrueClass:20> => true
got #<FalseClass:0> => false
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
`expect(actual).to eq(expected)` if you don't care about
object identity in this example.
# /tmp/d20151112-27349-5h228p/spec.rb:439:in `block (4 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.04836 seconds
57 examples, 9 failures
Failed examples:
rspec /tmp/d20151112-27349-5h228p/spec.rb:14 # BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-5h228p/spec.rb:220 # BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
rspec /tmp/d20151112-27349-5h228p/spec.rb:239 # BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
rspec /tmp/d20151112-27349-5h228p/spec.rb:272 # BeloteDeck hand #tierce? with tierce returns true for cards with names
rspec /tmp/d20151112-27349-5h228p/spec.rb:74 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-5h228p/spec.rb:74 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-5h228p/spec.rb:74 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-5h228p/spec.rb:14 # SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-5h228p/spec.rb:429 # SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
История (1 версия и 1 коментар)
Адриана обнови решението на 10.11.2015 23:27 (преди около 9 години)