From b142f01bb50b18da6cb86fbe23aba7849aab70a7 Mon Sep 17 00:00:00 2001
From: crespire
Date: Tue, 30 Nov 2021 13:05:34 -0500
Subject: [PATCH] Finish #2
---
spec/02_array_spec.rb | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/spec/02_array_spec.rb b/spec/02_array_spec.rb
index d43379d..a288fa8 100644
--- a/spec/02_array_spec.rb
+++ b/spec/02_array_spec.rb
@@ -72,12 +72,13 @@
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
@@ -85,14 +86,15 @@
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