Fix typo
This commit is contained in:
parent
533da82a16
commit
58823a3d49
|
@ -139,7 +139,7 @@ module Draper
|
||||||
|
|
||||||
def respond_to?(method)
|
def respond_to?(method)
|
||||||
if select_methods.include?(method)
|
if select_methods.include?(method)
|
||||||
model.repsond_to?(method)
|
model.respond_to?(method)
|
||||||
else
|
else
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
|
@ -163,11 +163,11 @@ describe Draper::Base do
|
||||||
let(:subject_with_allows){ DecoratorWithAllows.new(source) }
|
let(:subject_with_allows){ DecoratorWithAllows.new(source) }
|
||||||
|
|
||||||
it "should echo the allowed method" do
|
it "should echo the allowed method" do
|
||||||
subject_with_allows.should respond_to(:upcase)
|
subject_with_allows.should respond_to(:goodnight_moon)
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should echo _only_ the allowed method" do
|
it "should echo _only_ the allowed method" do
|
||||||
subject_with_allows.should_not respond_to(:downcase)
|
subject_with_allows.should_not respond_to(:hello_world)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
class DecoratorWithAllows < Draper::Base
|
class DecoratorWithAllows < Draper::Base
|
||||||
allows :upcase
|
allows :goodnight_moon
|
||||||
end
|
end
|
Loading…
Reference in New Issue