make specs order independed
This commit is contained in:
parent
5129026d42
commit
f42ec0a287
|
@ -712,10 +712,10 @@ describe Draper::Base do
|
|||
end
|
||||
|
||||
context "when #hello_world is called again" do
|
||||
before { subject.hello_world }
|
||||
it "proxies method directly after first hit" do
|
||||
subject.should_not_receive(:method_missing)
|
||||
subject.methods.should_not include(:hello_world)
|
||||
subject.hello_world
|
||||
subject.methods.should include(:hello_world)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -45,6 +45,10 @@ describe Rails::Generators::DecoratorGenerator do
|
|||
run_generator ["YourModel"]
|
||||
end
|
||||
|
||||
after do
|
||||
Object.send(:remove_const, :ApplicationDecorator)
|
||||
end
|
||||
|
||||
subject { file('app/decorators/your_model_decorator.rb') }
|
||||
it { should exist }
|
||||
it { should contain "class YourModelDecorator < ApplicationDecorator" }
|
||||
|
|
Loading…
Reference in New Issue