Skip to content
Browse files

Fix bad test

  • Loading branch information...
1 parent dc430b3 commit 43359e0efc85d9b6bdb35380eb41152f0cdce820 @haines haines committed Mar 30, 2013
Showing with 9 additions and 4 deletions.
  1. +9 −4 spec/draper/decorator_spec.rb
View
13 spec/draper/decorator_spec.rb
@@ -380,13 +380,18 @@ module Draper
end
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
decorator = Decorator.new(source)
- expect(source).not_to be_a_kind_of Draper::Decoratable::Equality
- decorator == :something
- expect(source).to be_a_kind_of Draper::Decoratable::Equality
+ expect(decorator).to eq Decorator.new(source)
+ end
+
+ 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
it "is true when source #== is true" do

0 comments on commit 43359e0

Please sign in to comment.
Something went wrong with that request. Please try again.