Skip to content

Commit

Permalink
Complete 15a assignment method TheOdinProject#3 & 4
Browse files Browse the repository at this point in the history
  • Loading branch information
lohikaarme committed Dec 9, 2023
1 parent a9b4076 commit 4450aa2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions spec/15a_binary_game_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,11 @@

# Write a test for the following context.
context 'when game minimum and maximum is 100 and 600' do
xit 'returns 9' do
subject(:game_six_hundred) { described_class.new(100, 600) }

it 'returns 9' do
max = game_six_hundred.maximum_guesses
expect(max). to eq(9)
end
end
end
Expand Down Expand Up @@ -332,8 +336,14 @@
# ASSIGNMENT #4

# Write a test for the following context.


context 'when game_over? is false five times' do
xit 'calls display_turn_order five times' do
before { allow(search_display).to receive(:game_over?).and_return(false, false, false, false, false, true) }

it 'calls display_turn_order five times' do
expect(game_display).to receive(:display_turn_order).with(search_display).exactly(5).times
game_display.display_binary_search(search_display)
end
end
end
Expand Down

0 comments on commit 4450aa2

Please sign in to comment.