Решение на Четвърта задача от Мила Русева
Обратно към всички решения
Към профила на Мила Русева
Резултати
- 2 точки от тестове
- 0 бонус точки
- 2 точки общо
- 21 успешни тест(а)
- 36 неуспешни тест(а)
Код
Лог от изпълнението
...FF.FFFF......FF.FFFF....FFFF.FFFFFFFFFFFFF.FFFF....FFF
Failures:
1) WarDeck behaves like a deck implements Enumerable
Failure/Error: expect(small_deck).to respond_to(:each)
expected #<WarDeck:0x007fade93fe5a0 @cards=[#<Card:0x007fade93fea50 @rank=:ace, @suit=:spades, @deck=#<WarDeck:0x007fade93fe5a0 ...>>, #<Card:0x007fade93fe870 @rank=9, @suit=:clubs, @deck=#<WarDeck:0x007fade93fe5a0 ...>>]> to respond to :each
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:140
# /tmp/d20151112-27349-39p1jf/spec.rb:10: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) WarDeck 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
NoMethodError:
undefined method `each' for #<WarDeck:0x007fadea1f0ca8>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:140
# /tmp/d20151112-27349-39p1jf/spec.rb:18:in `to_a'
# /tmp/d20151112-27349-39p1jf/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)>'
3) WarDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: expect(small_deck.to_a).to eq [nine_of_clubs]
NoMethodError:
undefined method `each' for #<WarDeck:0x007fadea28f6c8>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:140
# /tmp/d20151112-27349-39p1jf/spec.rb:30:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:30: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)>'
4) WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades]
NoMethodError:
undefined method `each' for #<WarDeck:0x007fadea28cc48>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:140
# /tmp/d20151112-27349-39p1jf/spec.rb:37:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:37: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 #top peeks at the top-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NoMethodError:
undefined method `each' for #<WarDeck:0x007fadea279530>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:140
# /tmp/d20151112-27349-39p1jf/spec.rb:44:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:44: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 #bottom peeks at the bottom-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NoMethodError:
undefined method `each' for #<WarDeck:0x007fadea1fe268>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:140
# /tmp/d20151112-27349-39p1jf/spec.rb:51:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:51: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) BeloteDeck behaves like a deck implements Enumerable
Failure/Error: expect(small_deck).to respond_to(:each)
expected #<BeloteDeck:0x007fadea24d4d0 @cards=[#<Card:0x007fadea24d5e8 @rank=:ace, @suit=:spades, @deck=#<BeloteDeck:0x007fadea24d4d0 ...>>, #<Card:0x007fadea24d570 @rank=9, @suit=:clubs, @deck=#<BeloteDeck:0x007fadea24d4d0 ...>>]> to respond to :each
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:191
# /tmp/d20151112-27349-39p1jf/spec.rb:10: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) 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
NoMethodError:
undefined method `each' for #<BeloteDeck:0x007fadea2423f0>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:191
# /tmp/d20151112-27349-39p1jf/spec.rb:18:in `to_a'
# /tmp/d20151112-27349-39p1jf/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) BeloteDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: expect(small_deck.to_a).to eq [nine_of_clubs]
NoMethodError:
undefined method `each' for #<BeloteDeck:0x007fadea222c30>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:191
# /tmp/d20151112-27349-39p1jf/spec.rb:30:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:30: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) BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades]
NoMethodError:
undefined method `each' for #<BeloteDeck:0x007fadea21b7a0>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:191
# /tmp/d20151112-27349-39p1jf/spec.rb:37:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:37: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) BeloteDeck behaves like a deck #top peeks at the top-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NoMethodError:
undefined method `each' for #<BeloteDeck:0x007fadea218668>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:191
# /tmp/d20151112-27349-39p1jf/spec.rb:44:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:44: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)>'
12) BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NoMethodError:
undefined method `each' for #<BeloteDeck:0x007fadea2095c8>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:191
# /tmp/d20151112-27349-39p1jf/spec.rb:51:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:51: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)>'
13) BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
Failure/Error: expect(hand.highest_of_suit(:clubs)).to eq Card.new(:ace, :clubs)
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:125:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:125:in `highest_of_suit'
# /tmp/d20151112-27349-39p1jf/spec.rb:232: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 hand #belote? returns true if there is a king and a queen of the same suit
Failure/Error: expect(hand.belote?).to be true
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:129:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:129:in `belote?'
# /tmp/d20151112-27349-39p1jf/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)>'
15) BeloteDeck hand #belote? returns false when there is no king and queen of the same suit
Failure/Error: expect(hand.belote?).to be false
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:129:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:129:in `belote?'
# /tmp/d20151112-27349-39p1jf/spec.rb:266: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)>'
16) BeloteDeck hand #tierce? with tierce returns true for cards with names
Failure/Error: expect(hand.tierce?).to be true
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:138:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:138:in `tierce?'
# /tmp/d20151112-27349-39p1jf/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)>'
17) BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
Failure/Error: expect(hand.tierce?).to be false
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:138:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:138:in `tierce?'
# /tmp/d20151112-27349-39p1jf/spec.rb:316: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)>'
18) BeloteDeck hand #quarte? detects four cards with increasing ranks
Failure/Error: expect(hand.quarte?).to be true
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:149:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:149:in `quarte?'
# /tmp/d20151112-27349-39p1jf/spec.rb:334: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)>'
19) BeloteDeck hand #quarte? does not return true if there is no quarte
Failure/Error: expect(hand.quarte?).to be false
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:149:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:149:in `quarte?'
# /tmp/d20151112-27349-39p1jf/spec.rb:349: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)>'
20) BeloteDeck hand #quint? detects five cards with increasing ranks
Failure/Error: expect(hand.quint?).to be true
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:160:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:160:in `quint?'
# /tmp/d20151112-27349-39p1jf/spec.rb:366: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)>'
21) BeloteDeck hand #quint? does not return true if there is no quint
Failure/Error: expect(hand.quint?).to be false
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:160:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:160:in `quint?'
# /tmp/d20151112-27349-39p1jf/spec.rb:381: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)>'
22) 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
ArgumentError:
wrong number of arguments (1 for 0)
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-39p1jf/spec.rb:386
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `all?'
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `block in has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each_cons'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:171:in `carre_of_jacks?'
# /tmp/d20151112-27349-39p1jf/spec.rb:86:in `public_send'
# /tmp/d20151112-27349-39p1jf/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)>'
23) BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
Failure/Error: expect(hand.public_send(method)).to be false
ArgumentError:
wrong number of arguments (1 for 0)
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-39p1jf/spec.rb:386
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `all?'
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `block in has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each_cons'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:171:in `carre_of_jacks?'
# /tmp/d20151112-27349-39p1jf/spec.rb:101:in `public_send'
# /tmp/d20151112-27349-39p1jf/spec.rb:101: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)>'
24) 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
ArgumentError:
wrong number of arguments (1 for 0)
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-39p1jf/spec.rb:390
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `all?'
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `block in has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each_cons'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:177:in `carre_of_nines?'
# /tmp/d20151112-27349-39p1jf/spec.rb:86:in `public_send'
# /tmp/d20151112-27349-39p1jf/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)>'
25) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
Failure/Error: expect(hand.public_send(method)).to be false
ArgumentError:
wrong number of arguments (1 for 0)
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-39p1jf/spec.rb:390
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `all?'
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `block in has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each_cons'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:177:in `carre_of_nines?'
# /tmp/d20151112-27349-39p1jf/spec.rb:101:in `public_send'
# /tmp/d20151112-27349-39p1jf/spec.rb:101: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)>'
26) 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
ArgumentError:
wrong number of arguments (1 for 0)
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-39p1jf/spec.rb:394
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `all?'
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `block in has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each_cons'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:183:in `carre_of_aces?'
# /tmp/d20151112-27349-39p1jf/spec.rb:86:in `public_send'
# /tmp/d20151112-27349-39p1jf/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)>'
27) BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
Failure/Error: expect(hand.public_send(method)).to be false
ArgumentError:
wrong number of arguments (1 for 0)
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-39p1jf/spec.rb:394
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `all?'
# /tmp/d20151112-27349-39p1jf/solution.rb:190:in `block in has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `each_cons'
# /tmp/d20151112-27349-39p1jf/solution.rb:189:in `has_carre?'
# /tmp/d20151112-27349-39p1jf/solution.rb:183:in `carre_of_aces?'
# /tmp/d20151112-27349-39p1jf/spec.rb:101:in `public_send'
# /tmp/d20151112-27349-39p1jf/spec.rb:101: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)>'
28) SixtySixDeck behaves like a deck implements Enumerable
Failure/Error: expect(small_deck).to respond_to(:each)
expected #<SixtySixDeck:0x007fadea00e188 @cards=[#<Card:0x007fadea00e2c8 @rank=:ace, @suit=:spades, @deck=#<SixtySixDeck:0x007fadea00e188 ...>>, #<Card:0x007fadea00e250 @rank=9, @suit=:clubs, @deck=#<SixtySixDeck:0x007fadea00e188 ...>>]> to respond to :each
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:400
# /tmp/d20151112-27349-39p1jf/spec.rb:10: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)>'
29) 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
NoMethodError:
undefined method `each' for #<SixtySixDeck:0x007fadea00f510>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:400
# /tmp/d20151112-27349-39p1jf/spec.rb:18:in `to_a'
# /tmp/d20151112-27349-39p1jf/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)>'
30) SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: expect(small_deck.to_a).to eq [nine_of_clubs]
NoMethodError:
undefined method `each' for #<SixtySixDeck:0x007fade9fc6fe0>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:400
# /tmp/d20151112-27349-39p1jf/spec.rb:30:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:30: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)>'
31) SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades]
NoMethodError:
undefined method `each' for #<SixtySixDeck:0x007fade9fc48a8>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:400
# /tmp/d20151112-27349-39p1jf/spec.rb:37:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:37: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)>'
32) SixtySixDeck behaves like a deck #top peeks at the top-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NoMethodError:
undefined method `each' for #<SixtySixDeck:0x007fade9f99090>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:400
# /tmp/d20151112-27349-39p1jf/spec.rb:44:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:44: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)>'
33) SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: expect(small_deck.to_a).to eq [ace_of_spades, nine_of_clubs]
NoMethodError:
undefined method `each' for #<SixtySixDeck:0x007fade9de1ba8>
Shared Example Group: "a deck" called from /tmp/d20151112-27349-39p1jf/spec.rb:400
# /tmp/d20151112-27349-39p1jf/spec.rb:51:in `to_a'
# /tmp/d20151112-27349-39p1jf/spec.rb:51: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)>'
34) SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
Failure/Error: expect(hand.twenty?(:hearts)).to be true
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:211:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:211:in `twenty?'
# /tmp/d20151112-27349-39p1jf/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)>'
35) SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
Failure/Error: expect(hand.twenty?(:clubs)).to be false
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:211:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:211:in `twenty?'
# /tmp/d20151112-27349-39p1jf/spec.rb:452: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)>'
36) SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
Failure/Error: expect(hand.twenty?(:hearts)).to be false
ArgumentError:
comparison of Card with Card failed
# /tmp/d20151112-27349-39p1jf/solution.rb:211:in `sort'
# /tmp/d20151112-27349-39p1jf/solution.rb:211:in `twenty?'
# /tmp/d20151112-27349-39p1jf/spec.rb:465: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.03955 seconds
57 examples, 36 failures
Failed examples:
rspec /tmp/d20151112-27349-39p1jf/spec.rb:8 # WarDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-39p1jf/spec.rb:14 # WarDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-39p1jf/spec.rb:28 # WarDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:35 # WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:42 # WarDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:49 # WarDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:8 # BeloteDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-39p1jf/spec.rb:14 # BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-39p1jf/spec.rb:28 # BeloteDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:35 # BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:42 # BeloteDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:49 # BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:220 # BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
rspec /tmp/d20151112-27349-39p1jf/spec.rb:239 # BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
rspec /tmp/d20151112-27349-39p1jf/spec.rb:254 # BeloteDeck hand #belote? returns false when there is no king and queen of the same suit
rspec /tmp/d20151112-27349-39p1jf/spec.rb:272 # BeloteDeck hand #tierce? with tierce returns true for cards with names
rspec /tmp/d20151112-27349-39p1jf/spec.rb:304 # BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
rspec /tmp/d20151112-27349-39p1jf/spec.rb:322 # BeloteDeck hand #quarte? detects four cards with increasing ranks
rspec /tmp/d20151112-27349-39p1jf/spec.rb:337 # BeloteDeck hand #quarte? does not return true if there is no quarte
rspec /tmp/d20151112-27349-39p1jf/spec.rb:354 # BeloteDeck hand #quint? detects five cards with increasing ranks
rspec /tmp/d20151112-27349-39p1jf/spec.rb:369 # BeloteDeck hand #quint? does not return true if there is no quint
rspec /tmp/d20151112-27349-39p1jf/spec.rb:74 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-39p1jf/spec.rb:89 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-39p1jf/spec.rb:74 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-39p1jf/spec.rb:89 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-39p1jf/spec.rb:74 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-39p1jf/spec.rb:89 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-39p1jf/spec.rb:8 # SixtySixDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-39p1jf/spec.rb:14 # SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-39p1jf/spec.rb:28 # SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:35 # SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:42 # SixtySixDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:49 # SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-39p1jf/spec.rb:429 # SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
rspec /tmp/d20151112-27349-39p1jf/spec.rb:442 # SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
rspec /tmp/d20151112-27349-39p1jf/spec.rb:455 # SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
История (1 версия и 1 коментар)
Мила обнови решението на 11.11.2015 10:25 (преди около 9 години)