Skip to content

Commit

Permalink
Specs for adapter eql? and ==.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunemaker committed Aug 7, 2012
1 parent 33c21bd commit 37b3289
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions spec/flipper/adapter_spec.rb
Expand Up @@ -266,4 +266,23 @@
end
end
end

describe "#eql?" do
it "returns true for same class and adapter" do
subject.eql?(described_class.new(adapter)).should be_true
end

it "returns false for different adapter" do
instance = described_class.new(Flipper::Adapters::Memory.new)
subject.eql?(instance).should be_false
end

it "returns false for different class" do
subject.eql?(Object.new).should be_false
end

it "is aliased to ==" do
(subject == described_class.new(adapter)).should be_true
end
end
end

0 comments on commit 37b3289

Please sign in to comment.