Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
crespire committed Nov 30, 2021
1 parent 303c6a8 commit b142f01
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions spec/02_array_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,29 @@
describe Array do
context 'when updating an implicit subject' do
# remove the 'x' before running this test
xit 'is empty' do
# Write a test to expect the subject to be empty.
it 'is empty' do
expect(subject).to be_empty
end

# remove the 'x' before running this test
xit 'updates length to 1' do
it 'updates length to 1' do
subject << 1
# Update the implicit subject to make this test pass.
expect(subject.length).to eq(1)
end
end

context 'when using one let variable on two tests' do
# Make a let variable that will pass both tests.
let(:lucky_numbers) { [39, 1, 2] }

# remove the 'x' before running this test
xit 'has length of 3' do
it 'has length of 3' do
expect(lucky_numbers.length).to eq(3)
end

# remove the 'x' before running this test
xit 'has sum of 42' do
it 'has sum of 42' do
expect(lucky_numbers.sum).to eq(42)
end
end
Expand Down

0 comments on commit b142f01

Please sign in to comment.