Решение на Четвърта задача от Емилия Банчева
Обратно към всички решения
Към профила на Емилия Банчева
Резултати
- 0 точки от тестове
- 0 бонус точки
- 0 точки общо
- 4 успешни тест(а)
- 53 неуспешни тест(а)
Код
Лог от изпълнението
..FFF.FFFFFFFFFFFF.FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
Failures:
1) Card #== compares two cards by their rank and suit
Failure/Error: expect(Card.new(4, :spades)).to eq Card.new(4, :spades)
expected: #<Card:0x007ff9959b5730 @rank=4, @suit=:spades>
got: #<Card:0x007ff9959b5780 @rank=4, @suit=:spades>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff9959b5730 @rank=4, @suit=:spades>
+#<Card:0x007ff9959b5780 @rank=4, @suit=:spades>
# /tmp/d20151112-27349-16k4mvb/spec.rb:131:in `block (3 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) WarDeck behaves like a deck implements Enumerable
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NameError:
undefined local variable or method `counter' for #<WarDeck:0x007ff995998c48>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/solution.rb:47:in `each'
# /tmp/d20151112-27349-16k4mvb/spec.rb:11:in `to_a'
# /tmp/d20151112-27349-16k4mvb/spec.rb:11: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)>'
3) WarDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: deck = deck_class.new
ArgumentError:
wrong number of arguments (0 for 1)
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/solution.rb:116:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:15:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:15: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)>'
4) WarDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: expect(small_deck.draw_top_card).to eq ace_of_spades
expected: #<Card:0x007ff9967fe238 @rank=:ace, @suit=:spades>
got: #<Card:0x007ff9967fe210 @rank=9, @suit=:clubs>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff9967fe238 @rank=:ace, @suit=:spades>
+#<Card:0x007ff9967fe210 @rank=9, @suit=:clubs>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/spec.rb:29:in `block (3 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) WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: expect(small_deck.draw_bottom_card).to eq nine_of_clubs
expected: #<Card:0x007ff996821c60 @rank=9, @suit=:clubs>
got: [#<Card:0x007ff996821c88 @rank=:ace, @suit=:spades>]
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff996821c60 @rank=9, @suit=:clubs>
+[#<Card:0x007ff996821c88 @rank=:ace, @suit=:spades>]
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/spec.rb:36:in `block (3 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) WarDeck behaves like a deck #top peeks at the top-most card
Failure/Error: expect(small_deck.top_card).to eq ace_of_spades
expected: #<Card:0x007ff9967908c8 @rank=:ace, @suit=:spades>
got: #<Card:0x007ff9967908a0 @rank=9, @suit=:clubs>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff9967908c8 @rank=:ace, @suit=:spades>
+#<Card:0x007ff9967908a0 @rank=9, @suit=:clubs>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/spec.rb:43:in `block (3 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) WarDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: expect(small_deck.bottom_card).to eq nine_of_clubs
expected: #<Card:0x007ff99684a840 @rank=9, @suit=:clubs>
got: #<Card:0x007ff99684a868 @rank=:ace, @suit=:spades>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff99684a840 @rank=9, @suit=:clubs>
+#<Card:0x007ff99684a868 @rank=:ace, @suit=:spades>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/spec.rb:50:in `block (3 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) WarDeck behaves like a deck #shuffle does not remove cards from the deck
Failure/Error: deck = deck_class.new
ArgumentError:
wrong number of arguments (0 for 1)
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/solution.rb:116:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:57:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:57:in `block (3 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) WarDeck behaves like a deck #to_s returns the names of the cards, each on its own line
Failure/Error: expect(small_deck.to_s.strip).to eq "Ace of Spades\n9 of Clubs"
NoMethodError:
undefined method `strip' for nil:NilClass
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:140
# /tmp/d20151112-27349-16k4mvb/spec.rb:68:in `block (3 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)>'
10) WarDeck #sort sorts the cards in the defined order
Failure/Error: expect(deck.sort.to_a).to eq [jack_of_spades, ten_of_hearts, ace_of_clubs, two_of_clubs]
NoMethodError:
undefined method `fullDeck' for #<WarDeck:0x007ff9967f5570>
# /tmp/d20151112-27349-16k4mvb/solution.rb:84:in `sort'
# /tmp/d20151112-27349-16k4mvb/spec.rb:155:in `block (3 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)>'
11) WarDeck hand #deal deals 26 cards
Failure/Error: hand = WarDeck.new.deal
ArgumentError:
wrong number of arguments (0 for 1)
# /tmp/d20151112-27349-16k4mvb/solution.rb:116:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:162:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:162: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)>'
12) WarDeck hand #allow_face_up? returns false if the cards are more than 3
Failure/Error: let(:hand) { WarDeck.new.deal }
ArgumentError:
wrong number of arguments (0 for 1)
# /tmp/d20151112-27349-16k4mvb/solution.rb:116:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:169:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:169:in `block (4 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:172: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)>'
13) WarDeck hand #allow_face_up? returns true if the cards are less than or equal to 3
Failure/Error: let(:hand) { WarDeck.new.deal }
ArgumentError:
wrong number of arguments (0 for 1)
# /tmp/d20151112-27349-16k4mvb/solution.rb:116:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:169:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:169:in `block (4 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:176:in `block (5 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:176:in `times'
# /tmp/d20151112-27349-16k4mvb/spec.rb:176: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)>'
14) BeloteDeck behaves like a deck implements Enumerable
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NameError:
undefined local variable or method `counter' for #<BeloteDeck:0x007ff9967c3a70>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/solution.rb:47:in `each'
# /tmp/d20151112-27349-16k4mvb/spec.rb:11:in `to_a'
# /tmp/d20151112-27349-16k4mvb/spec.rb:11: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)>'
15) BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: deck = deck_class.new
ArgumentError:
wrong number of arguments (0 for 1)
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/solution.rb:135:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:15:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:15: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)>'
16) BeloteDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: expect(small_deck.draw_top_card).to eq ace_of_spades
expected: #<Card:0x007ff9967add38 @rank=:ace, @suit=:spades>
got: #<Card:0x007ff9967add10 @rank=9, @suit=:clubs>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff9967add38 @rank=:ace, @suit=:spades>
+#<Card:0x007ff9967add10 @rank=9, @suit=:clubs>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/spec.rb:29:in `block (3 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)>'
17) BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: expect(small_deck.draw_bottom_card).to eq nine_of_clubs
expected: #<Card:0x007ff996752258 @rank=9, @suit=:clubs>
got: [#<Card:0x007ff9967522d0 @rank=:ace, @suit=:spades>]
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff996752258 @rank=9, @suit=:clubs>
+[#<Card:0x007ff9967522d0 @rank=:ace, @suit=:spades>]
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/spec.rb:36:in `block (3 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)>'
18) BeloteDeck behaves like a deck #top peeks at the top-most card
Failure/Error: expect(small_deck.top_card).to eq ace_of_spades
expected: #<Card:0x007ff9967135a8 @rank=:ace, @suit=:spades>
got: #<Card:0x007ff996713580 @rank=9, @suit=:clubs>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff9967135a8 @rank=:ace, @suit=:spades>
+#<Card:0x007ff996713580 @rank=9, @suit=:clubs>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/spec.rb:43:in `block (3 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)>'
19) BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: expect(small_deck.bottom_card).to eq nine_of_clubs
expected: #<Card:0x007ff9966ed330 @rank=9, @suit=:clubs>
got: #<Card:0x007ff9966ed358 @rank=:ace, @suit=:spades>
(compared using ==)
Diff:
@@ -1,2 +1,2 @@
-#<Card:0x007ff9966ed330 @rank=9, @suit=:clubs>
+#<Card:0x007ff9966ed358 @rank=:ace, @suit=:spades>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/spec.rb:50:in `block (3 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)>'
20) BeloteDeck behaves like a deck #shuffle does not remove cards from the deck
Failure/Error: deck = deck_class.new
ArgumentError:
wrong number of arguments (0 for 1)
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/solution.rb:135:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:57:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:57:in `block (3 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)>'
21) BeloteDeck behaves like a deck #to_s returns the names of the cards, each on its own line
Failure/Error: expect(small_deck.to_s.strip).to eq "Ace of Spades\n9 of Clubs"
NoMethodError:
undefined method `strip' for nil:NilClass
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:191
# /tmp/d20151112-27349-16k4mvb/spec.rb:68:in `block (3 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)>'
22) BeloteDeck #sort sorts the cards in the defined order
Failure/Error: expect(deck.sort.to_a).to eq [jack_of_spades, ten_of_hearts, ace_of_clubs, seven_of_clubs]
NoMethodError:
undefined method `fullDeck' for #<BeloteDeck:0x007ff99669fb08>
# /tmp/d20151112-27349-16k4mvb/solution.rb:84:in `sort'
# /tmp/d20151112-27349-16k4mvb/spec.rb:206:in `block (3 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)>'
23) BeloteDeck hand #deal deals 8 cards
Failure/Error: hand = BeloteDeck.new.deal
ArgumentError:
wrong number of arguments (0 for 1)
# /tmp/d20151112-27349-16k4mvb/solution.rb:135:in `initialize'
# /tmp/d20151112-27349-16k4mvb/spec.rb:213:in `new'
# /tmp/d20151112-27349-16k4mvb/spec.rb:213: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)>'
24) BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:230: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)>'
25) BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:249: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)>'
26) BeloteDeck hand #belote? returns false when there is no king and queen of the same suit
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:264: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)>'
27) BeloteDeck hand #tierce? with tierce returns true for cards with names
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:282: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)>'
28) BeloteDeck hand #tierce? with tierce returns true for cards with numbers
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:297: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)>'
29) BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:314: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)>'
30) BeloteDeck hand #quarte? detects four cards with increasing ranks
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:332: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)>'
31) BeloteDeck hand #quarte? does not return true if there is no quarte
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:347: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)>'
32) BeloteDeck hand #quint? detects five cards with increasing ranks
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:364: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)>'
33) BeloteDeck hand #quint? does not return true if there is no quint
Failure/Error: ]).deal
Timeout::Error:
execution expired
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:379: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)>'
34) BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
Failure/Error: ]).deal
Timeout::Error:
execution expired
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-16k4mvb/spec.rb:386
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:84: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)>'
35) BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
Failure/Error: ]).deal
Timeout::Error:
execution expired
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-16k4mvb/spec.rb:386
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:99: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)>'
36) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
Failure/Error: ]).deal
Timeout::Error:
execution expired
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-16k4mvb/spec.rb:390
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:84: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)>'
37) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
Failure/Error: ]).deal
Timeout::Error:
execution expired
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-16k4mvb/spec.rb:390
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:99: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)>'
38) BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
Failure/Error: ]).deal
Timeout::Error:
execution expired
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-16k4mvb/spec.rb:394
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:84: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)>'
39) BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
Failure/Error: ]).deal
Timeout::Error:
execution expired
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-16k4mvb/spec.rb:394
# /tmp/d20151112-27349-16k4mvb/solution.rb:108:in `deal'
# /tmp/d20151112-27349-16k4mvb/spec.rb:99: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)>'
40) SixtySixDeck behaves like a deck implements Enumerable
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:9: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)>'
41) SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:15: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)>'
42) SixtySixDeck behaves like a deck #size returns the size of the deck
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:23:in `block (3 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)>'
43) SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:29:in `block (3 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)>'
44) SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:36:in `block (3 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)>'
45) SixtySixDeck behaves like a deck #top peeks at the top-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:43:in `block (3 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)>'
46) SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:50:in `block (3 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)>'
47) SixtySixDeck behaves like a deck #shuffle does not remove cards from the deck
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:57:in `block (3 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)>'
48) SixtySixDeck behaves like a deck #to_s returns the names of the cards, each on its own line
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant SixtySixDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-16k4mvb/spec.rb:400
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-16k4mvb/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-16k4mvb/spec.rb:68:in `block (3 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)>'
49) SixtySixDeck #sort sorts the cards in the defined order
Failure/Error: deck = SixtySixDeck.new(cards)
NameError:
uninitialized constant SixtySixDeck
# /tmp/d20151112-27349-16k4mvb/spec.rb:413:in `block (3 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)>'
50) SixtySixDeck hand #deal deals 6 cards
Failure/Error: hand = SixtySixDeck.new.deal
NameError:
uninitialized constant SixtySixDeck
# /tmp/d20151112-27349-16k4mvb/spec.rb:422: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)>'
51) SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
Failure/Error: hand = SixtySixDeck.new([
NameError:
uninitialized constant SixtySixDeck
# /tmp/d20151112-27349-16k4mvb/spec.rb:430: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)>'
52) SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
Failure/Error: hand = SixtySixDeck.new([
NameError:
uninitialized constant SixtySixDeck
# /tmp/d20151112-27349-16k4mvb/spec.rb:443: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)>'
53) SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
Failure/Error: hand = SixtySixDeck.new([
NameError:
uninitialized constant SixtySixDeck
# /tmp/d20151112-27349-16k4mvb/spec.rb:456: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 17.76 seconds
57 examples, 53 failures
Failed examples:
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:130 # Card #== compares two cards by their rank and suit
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:8 # WarDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:14 # WarDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:28 # WarDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:35 # WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:42 # WarDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:49 # WarDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:56 # WarDeck behaves like a deck #shuffle does not remove cards from the deck
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:67 # WarDeck behaves like a deck #to_s returns the names of the cards, each on its own line
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:145 # WarDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:161 # WarDeck hand #deal deals 26 cards
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:171 # WarDeck hand #allow_face_up? returns false if the cards are more than 3
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:175 # WarDeck hand #allow_face_up? returns true if the cards are less than or equal to 3
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:8 # BeloteDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:14 # BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:28 # BeloteDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:35 # BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:42 # BeloteDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:49 # BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:56 # BeloteDeck behaves like a deck #shuffle does not remove cards from the deck
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:67 # BeloteDeck behaves like a deck #to_s returns the names of the cards, each on its own line
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:196 # BeloteDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:212 # BeloteDeck hand #deal deals 8 cards
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:220 # BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:239 # BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:254 # BeloteDeck hand #belote? returns false when there is no king and queen of the same suit
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:272 # BeloteDeck hand #tierce? with tierce returns true for cards with names
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:287 # BeloteDeck hand #tierce? with tierce returns true for cards with numbers
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:304 # BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:322 # BeloteDeck hand #quarte? detects four cards with increasing ranks
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:337 # BeloteDeck hand #quarte? does not return true if there is no quarte
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:354 # BeloteDeck hand #quint? detects five cards with increasing ranks
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:369 # BeloteDeck hand #quint? does not return true if there is no quint
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:74 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:89 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:74 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:89 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:74 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:89 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:8 # SixtySixDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:14 # SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:22 # SixtySixDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:28 # SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:35 # SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:42 # SixtySixDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:49 # SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:56 # SixtySixDeck behaves like a deck #shuffle does not remove cards from the deck
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:67 # SixtySixDeck behaves like a deck #to_s returns the names of the cards, each on its own line
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:405 # SixtySixDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:421 # SixtySixDeck hand #deal deals 6 cards
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:429 # SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:442 # SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
rspec /tmp/d20151112-27349-16k4mvb/spec.rb:455 # SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
История (1 версия и 1 коментар)
Емилия обнови решението на 10.11.2015 22:25 (преди около 9 години)