Решение на Четвърта задача от Михаела Чуренска
Обратно към всички решения
Към профила на Михаела Чуренска
Резултати
- 1 точка от тестове
- 0 бонус точки
- 1 точка общо
- 8 успешни тест(а)
- 49 неуспешни тест(а)
Код
Лог от изпълнението
FFFFFFFFFF.FF...FFFFFFF.FF.FFFFFFFFFFFFFFFFFFFFFFF.FF.FFF
Failures:
1) Card #to_s stringifies and capitalizes the rank and suit
Failure/Error: all_cards = suits.product(ranks).map { |suit, rank| Card.new(rank, suit) }
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:111:in `block (4 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:111:in `map'
# /tmp/d20151112-27349-y2s9ha/spec.rb:111: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) Card readers has readers for rank and suit
Failure/Error: card = Card.new(:jack, :spades)
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:122: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)>'
3) Card #== compares two cards by their rank and suit
Failure/Error: expect(Card.new(4, :spades)).to eq Card.new(4, :spades)
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/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)>'
4) WarDeck behaves like a deck implements Enumerable
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
5) WarDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: all_available_cards = suits.product(ranks).map { |suit, rank| Card.new(rank, suit) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:16:in `block (3 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:16:in `map'
# /tmp/d20151112-27349-y2s9ha/spec.rb:16: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) WarDeck behaves like a deck #size returns the size of the deck
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
7) WarDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
8) WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
9) WarDeck behaves like a deck #top peeks at the top-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
10) WarDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
11) WarDeck behaves like a deck #to_s returns the names of the cards, each on its own line
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:140
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
12) WarDeck #sort sorts the cards in the defined order
Failure/Error: ace_of_clubs = Card.new(:ace, :clubs)
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:146: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 behaves like a deck implements Enumerable
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
14) BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: all_available_cards = suits.product(ranks).map { |suit, rank| Card.new(rank, suit) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:16:in `block (3 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:16:in `map'
# /tmp/d20151112-27349-y2s9ha/spec.rb:16: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 #size returns the size of the deck
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
16) BeloteDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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 #to_s returns the names of the cards, each on its own line
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:191
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
21) BeloteDeck #sort sorts the cards in the defined order
Failure/Error: ace_of_clubs = Card.new(:ace, :clubs)
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:197: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 hand #highest_of_suit returns the strongest card of the specified suit
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:222: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)>'
23) BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:241: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 #belote? returns false when there is no king and queen of the same suit
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:256: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 #tierce? with tierce returns true for cards with names
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:274: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)>'
26) BeloteDeck hand #tierce? with tierce returns true for cards with numbers
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:289: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)>'
27) BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:306: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 #quarte? detects four cards with increasing ranks
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:324: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)>'
29) BeloteDeck hand #quarte? does not return true if there is no quarte
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:339: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)>'
30) BeloteDeck hand #quint? detects five cards with increasing ranks
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:356: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 #quint? does not return true if there is no quint
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:371: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 #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-y2s9ha/spec.rb:386
# /tmp/d20151112-27349-y2s9ha/spec.rb:76: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)>'
33) BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-y2s9ha/spec.rb:386
# /tmp/d20151112-27349-y2s9ha/spec.rb:91: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)>'
34) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-y2s9ha/spec.rb:390
# /tmp/d20151112-27349-y2s9ha/spec.rb:76: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_nines? behaves like carre-checking method returns false when there is no carre
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-y2s9ha/spec.rb:390
# /tmp/d20151112-27349-y2s9ha/spec.rb:91: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_aces? behaves like carre-checking method returns true when there is a carre
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-y2s9ha/spec.rb:394
# /tmp/d20151112-27349-y2s9ha/spec.rb:76: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_aces? behaves like carre-checking method returns false when there is no carre
Failure/Error: Card.new(7, :clubs),
NameError:
uninitialized constant Card
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-y2s9ha/spec.rb:394
# /tmp/d20151112-27349-y2s9ha/spec.rb:91: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) SixtySixDeck behaves like a deck implements Enumerable
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
39) SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
Failure/Error: all_available_cards = suits.product(ranks).map { |suit, rank| Card.new(rank, suit) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:16:in `block (3 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:16:in `map'
# /tmp/d20151112-27349-y2s9ha/spec.rb:16: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 #size returns the size of the deck
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
41) SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
42) SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
43) SixtySixDeck behaves like a deck #top peeks at the top-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
44) SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
45) SixtySixDeck behaves like a deck #to_s returns the names of the cards, each on its own line
Failure/Error: let(:ace_of_spades) { Card.new(:ace, :spades) }
NameError:
uninitialized constant Card
Shared Example Group: "a deck" called from /tmp/d20151112-27349-y2s9ha/spec.rb:400
# /tmp/d20151112-27349-y2s9ha/spec.rb:4:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-y2s9ha/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)>'
46) SixtySixDeck #sort sorts the cards in the defined order
Failure/Error: ace_of_clubs = Card.new(:ace, :clubs)
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:406: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 hand #twenty? returns true for king and queen not of the trump suit
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:431: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)>'
48) SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:444: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)>'
49) SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
Failure/Error: Card.new(:ace, :clubs),
NameError:
uninitialized constant Card
# /tmp/d20151112-27349-y2s9ha/spec.rb:457: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.09665 seconds
57 examples, 49 failures
Failed examples:
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:110 # Card #to_s stringifies and capitalizes the rank and suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:121 # Card readers has readers for rank and suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:130 # Card #== compares two cards by their rank and suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:8 # WarDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:14 # WarDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:22 # WarDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:28 # WarDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:35 # WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:42 # WarDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:49 # WarDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-y2s9ha/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-y2s9ha/spec.rb:145 # WarDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:8 # BeloteDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:14 # BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:22 # BeloteDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:28 # BeloteDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:35 # BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:42 # BeloteDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:49 # BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-y2s9ha/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-y2s9ha/spec.rb:196 # BeloteDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:220 # BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:239 # BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:254 # BeloteDeck hand #belote? returns false when there is no king and queen of the same suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:272 # BeloteDeck hand #tierce? with tierce returns true for cards with names
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:287 # BeloteDeck hand #tierce? with tierce returns true for cards with numbers
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:304 # BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:322 # BeloteDeck hand #quarte? detects four cards with increasing ranks
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:337 # BeloteDeck hand #quarte? does not return true if there is no quarte
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:354 # BeloteDeck hand #quint? detects five cards with increasing ranks
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:369 # BeloteDeck hand #quint? does not return true if there is no quint
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:74 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:89 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:74 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:89 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:74 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:89 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:8 # SixtySixDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:14 # SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:22 # SixtySixDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:28 # SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:35 # SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:42 # SixtySixDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:49 # SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-y2s9ha/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-y2s9ha/spec.rb:405 # SixtySixDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:429 # SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:442 # SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
rspec /tmp/d20151112-27349-y2s9ha/spec.rb:455 # SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
История (1 версия и 1 коментар)
Михаела обнови решението на 10.11.2015 19:08 (преди около 9 години)