Skip to content

Commit

Permalink
Use be instead of eq for identity comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
sferik committed Nov 10, 2014
1 parent 7aab7b3 commit fd4b234
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/predicate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
end

it 'responds to predicate-style methods with false' do
expect(null.too_much_coffee?).to eq(false)
expect(null.too_much_coffee?).to be(false)
end

it 'responds to other methods with nil' do
expect(null.foobar).to eq(nil)
expect(null.foobar).to be(nil)
end

describe '(black hole)' do
Expand All @@ -25,7 +25,7 @@
end

it 'responds to predicate-style methods with false' do
expect(null.too_much_coffee?).to eq(false)
expect(null.too_much_coffee?).to be(false)
end

it 'responds to other methods with self' do
Expand All @@ -42,7 +42,7 @@
end

it 'responds to predicate-style methods with false' do
expect(null.too_much_coffee?).to eq(false)
expect(null.too_much_coffee?).to be(false)
end

it 'responds to other methods with self' do
Expand All @@ -69,7 +69,7 @@ def origin
end

it 'responds to predicate-style methods with false' do
expect(null.black?).to eq(false)
expect(null.black?).to be(false)
end

it 'responds to other methods with nil' do
Expand Down

0 comments on commit fd4b234

Please sign in to comment.