Skip to content

Commit

Permalink
Complete TheOdinProject#8
Browse files Browse the repository at this point in the history
Remember that if you're using change, expect requires a block.
  • Loading branch information
crespire committed Dec 2, 2021
1 parent a5ff521 commit 7657d3c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions spec/08_change_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,18 @@

context 'when rotating the array of lucky numbers' do
# remove the 'x' before running this test
xit 'will change the first value to 7' do
it 'will change the first value to 7' do
expect { lucky_numbers.rotate! }.to change { lucky_numbers.first }.to(7)
end

# remove the 'x' before running this test
xit 'will change the last value to 3' do
it 'will change the last value to 3' do
expect { lucky_numbers.rotate! }.to change { lucky_numbers.last }.to(3)
end

# remove the 'x' before running this test
xit 'will change the first value to 7 and last value to 3' do
it 'will change the first value to 7 and last value to 3' do
expect { lucky_numbers.rotate! }.to change { lucky_numbers.last }.to(3).and change { lucky_numbers.first }.to(7)
end
end
end

0 comments on commit 7657d3c

Please sign in to comment.