Решение на Четвърта задача от Мирослав Лалев
Обратно към всички решения
Към профила на Мирослав Лалев
Резултати
- 0 точки от тестове
- 0 бонус точки
- 0 точки общо
- 0 успешни тест(а)
- 57 неуспешни тест(а)
Код
Лог от изпълнението
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
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-17e753e/spec.rb:111:in `block (4 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:111:in `map'
# /tmp/d20151112-27349-17e753e/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-17e753e/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-17e753e/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: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
5) WarDeck 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 WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
6) WarDeck behaves like a deck #size returns the size of the deck
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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 #shuffle does not remove cards from the deck
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
12) WarDeck 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 WarDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:140
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
13) 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-17e753e/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)>'
14) WarDeck hand #deal deals 26 cards
Failure/Error: hand = WarDeck.new.deal
NameError:
uninitialized constant WarDeck
# /tmp/d20151112-27349-17e753e/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)>'
15) WarDeck hand #allow_face_up? returns false if the cards are more than 3
Failure/Error: let(:hand) { WarDeck.new.deal }
NameError:
uninitialized constant WarDeck
# /tmp/d20151112-27349-17e753e/spec.rb:169:in `block (4 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
16) WarDeck hand #allow_face_up? returns true if the cards are less than or equal to 3
Failure/Error: let(:hand) { WarDeck.new.deal }
NameError:
uninitialized constant WarDeck
# /tmp/d20151112-27349-17e753e/spec.rb:169:in `block (4 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:176:in `block (5 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:176:in `times'
# /tmp/d20151112-27349-17e753e/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)>'
17) BeloteDeck behaves like a deck implements Enumerable
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
18) BeloteDeck 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 BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
19) BeloteDeck behaves like a deck #size returns the size of the deck
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
20) BeloteDeck behaves like a deck #draw_top_card pops the top-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
21) BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
22) BeloteDeck behaves like a deck #top peeks at the top-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
23) BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
24) BeloteDeck behaves like a deck #shuffle does not remove cards from the deck
Failure/Error: subject(:deck_class) { Object.const_get(klass) }
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
25) BeloteDeck 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 BeloteDeck
Shared Example Group: "a deck" called from /tmp/d20151112-27349-17e753e/spec.rb:191
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
26) 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-17e753e/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)>'
27) BeloteDeck hand #deal deals 8 cards
Failure/Error: hand = BeloteDeck.new.deal
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/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)>'
28) BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:221: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 #belote? returns true if there is a king and a queen of the same suit
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:240: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 #belote? returns false when there is no king and queen of the same suit
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:255: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 #tierce? with tierce returns true for cards with names
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:273: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)>'
32) BeloteDeck hand #tierce? with tierce returns true for cards with numbers
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:288: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)>'
33) BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:305: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)>'
34) BeloteDeck hand #quarte? detects four cards with increasing ranks
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:323: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) BeloteDeck hand #quarte? does not return true if there is no quarte
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:338: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) BeloteDeck hand #quint? detects five cards with increasing ranks
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:355: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)>'
37) BeloteDeck hand #quint? does not return true if there is no quint
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
# /tmp/d20151112-27349-17e753e/spec.rb:370: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)>'
38) BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-17e753e/spec.rb:386
# /tmp/d20151112-27349-17e753e/spec.rb:75: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_jacks? behaves like carre-checking method returns false when there is no carre
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-17e753e/spec.rb:386
# /tmp/d20151112-27349-17e753e/spec.rb:90: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) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-17e753e/spec.rb:390
# /tmp/d20151112-27349-17e753e/spec.rb:75: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) BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-17e753e/spec.rb:390
# /tmp/d20151112-27349-17e753e/spec.rb:90: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) BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-17e753e/spec.rb:394
# /tmp/d20151112-27349-17e753e/spec.rb:75: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)>'
43) BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
Failure/Error: hand = BeloteDeck.new([
NameError:
uninitialized constant BeloteDeck
Shared Example Group: "carre-checking method" called from /tmp/d20151112-27349-17e753e/spec.rb:394
# /tmp/d20151112-27349-17e753e/spec.rb:90: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)>'
44) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
45) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
46) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
47) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
48) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
49) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
50) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
51) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
52) 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-17e753e/spec.rb:400
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `const_get'
# /tmp/d20151112-27349-17e753e/spec.rb:2:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/spec.rb:6:in `block (2 levels) in <top (required)>'
# /tmp/d20151112-27349-17e753e/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)>'
53) 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-17e753e/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)>'
54) SixtySixDeck hand #deal deals 6 cards
Failure/Error: hand = SixtySixDeck.new.deal
NameError:
uninitialized constant SixtySixDeck
# /tmp/d20151112-27349-17e753e/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)>'
55) 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-17e753e/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)>'
56) 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-17e753e/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)>'
57) 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-17e753e/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 0.10377 seconds
57 examples, 57 failures
Failed examples:
rspec /tmp/d20151112-27349-17e753e/spec.rb:110 # Card #to_s stringifies and capitalizes the rank and suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:121 # Card readers has readers for rank and suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:130 # Card #== compares two cards by their rank and suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:8 # WarDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-17e753e/spec.rb:14 # WarDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-17e753e/spec.rb:22 # WarDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-17e753e/spec.rb:28 # WarDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:35 # WarDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:42 # WarDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:49 # WarDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:56 # WarDeck behaves like a deck #shuffle does not remove cards from the deck
rspec /tmp/d20151112-27349-17e753e/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-17e753e/spec.rb:145 # WarDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-17e753e/spec.rb:161 # WarDeck hand #deal deals 26 cards
rspec /tmp/d20151112-27349-17e753e/spec.rb:171 # WarDeck hand #allow_face_up? returns false if the cards are more than 3
rspec /tmp/d20151112-27349-17e753e/spec.rb:175 # WarDeck hand #allow_face_up? returns true if the cards are less than or equal to 3
rspec /tmp/d20151112-27349-17e753e/spec.rb:8 # BeloteDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-17e753e/spec.rb:14 # BeloteDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-17e753e/spec.rb:22 # BeloteDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-17e753e/spec.rb:28 # BeloteDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:35 # BeloteDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:42 # BeloteDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:49 # BeloteDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:56 # BeloteDeck behaves like a deck #shuffle does not remove cards from the deck
rspec /tmp/d20151112-27349-17e753e/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-17e753e/spec.rb:196 # BeloteDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-17e753e/spec.rb:212 # BeloteDeck hand #deal deals 8 cards
rspec /tmp/d20151112-27349-17e753e/spec.rb:220 # BeloteDeck hand #highest_of_suit returns the strongest card of the specified suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:239 # BeloteDeck hand #belote? returns true if there is a king and a queen of the same suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:254 # BeloteDeck hand #belote? returns false when there is no king and queen of the same suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:272 # BeloteDeck hand #tierce? with tierce returns true for cards with names
rspec /tmp/d20151112-27349-17e753e/spec.rb:287 # BeloteDeck hand #tierce? with tierce returns true for cards with numbers
rspec /tmp/d20151112-27349-17e753e/spec.rb:304 # BeloteDeck hand #tierce? without tierce does not confuse cards with different suits
rspec /tmp/d20151112-27349-17e753e/spec.rb:322 # BeloteDeck hand #quarte? detects four cards with increasing ranks
rspec /tmp/d20151112-27349-17e753e/spec.rb:337 # BeloteDeck hand #quarte? does not return true if there is no quarte
rspec /tmp/d20151112-27349-17e753e/spec.rb:354 # BeloteDeck hand #quint? detects five cards with increasing ranks
rspec /tmp/d20151112-27349-17e753e/spec.rb:369 # BeloteDeck hand #quint? does not return true if there is no quint
rspec /tmp/d20151112-27349-17e753e/spec.rb:74 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-17e753e/spec.rb:89 # BeloteDeck hand #carre_of_jacks? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-17e753e/spec.rb:74 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-17e753e/spec.rb:89 # BeloteDeck hand #carre_of_nines? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-17e753e/spec.rb:74 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns true when there is a carre
rspec /tmp/d20151112-27349-17e753e/spec.rb:89 # BeloteDeck hand #carre_of_aces? behaves like carre-checking method returns false when there is no carre
rspec /tmp/d20151112-27349-17e753e/spec.rb:8 # SixtySixDeck behaves like a deck implements Enumerable
rspec /tmp/d20151112-27349-17e753e/spec.rb:14 # SixtySixDeck behaves like a deck fills the deck if no initialize parameters are given
rspec /tmp/d20151112-27349-17e753e/spec.rb:22 # SixtySixDeck behaves like a deck #size returns the size of the deck
rspec /tmp/d20151112-27349-17e753e/spec.rb:28 # SixtySixDeck behaves like a deck #draw_top_card pops the top-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:35 # SixtySixDeck behaves like a deck #draw_bottom_card pops the bottom-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:42 # SixtySixDeck behaves like a deck #top peeks at the top-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:49 # SixtySixDeck behaves like a deck #bottom peeks at the bottom-most card
rspec /tmp/d20151112-27349-17e753e/spec.rb:56 # SixtySixDeck behaves like a deck #shuffle does not remove cards from the deck
rspec /tmp/d20151112-27349-17e753e/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-17e753e/spec.rb:405 # SixtySixDeck #sort sorts the cards in the defined order
rspec /tmp/d20151112-27349-17e753e/spec.rb:421 # SixtySixDeck hand #deal deals 6 cards
rspec /tmp/d20151112-27349-17e753e/spec.rb:429 # SixtySixDeck hand #twenty? returns true for king and queen not of the trump suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:442 # SixtySixDeck hand #twenty? returns false for king and queen of the trump suit
rspec /tmp/d20151112-27349-17e753e/spec.rb:455 # SixtySixDeck hand #twenty? returns false for hands without a king and queen of the same suit
История (2 версии и 1 коментар)
Мирослав обнови решението на 11.11.2015 15:57 (преди около 9 години)
Мирослав обнови решението на 11.11.2015 16:01 (преди около 9 години)