Fix bad test
This commit is contained in:
parent
dc430b3e82
commit
43359e0efc
|
@ -380,13 +380,18 @@ module Draper
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#==" do
|
describe "#==" do
|
||||||
it "ensures the source has a decoration-aware #==" do
|
it "works for a source that does not include Decoratable" do
|
||||||
source = Object.new
|
source = Object.new
|
||||||
decorator = Decorator.new(source)
|
decorator = Decorator.new(source)
|
||||||
|
|
||||||
expect(source).not_to be_a_kind_of Draper::Decoratable::Equality
|
expect(decorator).to eq Decorator.new(source)
|
||||||
decorator == :something
|
end
|
||||||
expect(source).to be_a_kind_of Draper::Decoratable::Equality
|
|
||||||
|
it "works for a multiply-decorated source that does not include Decoratable" do
|
||||||
|
source = Object.new
|
||||||
|
decorator = Decorator.new(source)
|
||||||
|
|
||||||
|
expect(decorator).to eq ProductDecorator.new(Decorator.new(source))
|
||||||
end
|
end
|
||||||
|
|
||||||
it "is true when source #== is true" do
|
it "is true when source #== is true" do
|
||||||
|
|
Loading…
Reference in New Issue