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 b184950
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/predicate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
end
end

it 'responds to predicate-style methods with false' do
expect(null.too_much_coffee?).to eq(false)
it 'does not overwrite respond_to?' do
expect(null.respond_to?(:==)).to be(true)
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 b184950

Please sign in to comment.