parent
ea27146398
commit
65e3c4e457
|
@ -70,6 +70,11 @@ module Draper
|
||||||
@decorator_class ||= self.class.inferred_decorator_class
|
@decorator_class ||= self.class.inferred_decorator_class
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# @return [true]
|
||||||
|
def decorated?
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
# @return the collection being decorated.
|
# @return the collection being decorated.
|
||||||
|
|
|
@ -255,5 +255,13 @@ module Draper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe '#decorated?' do
|
||||||
|
it 'returns true' do
|
||||||
|
decorator = ProductsDecorator.new([Product.new])
|
||||||
|
|
||||||
|
expect(decorator).to be_decorated
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue