mirror of
https://github.com/drapergem/draper
synced 2023-03-27 23:21:17 -04:00
make specs order independed
This commit is contained in:
parent
5129026d42
commit
f42ec0a287
3 changed files with 7 additions and 2 deletions
1
.rspec
1
.rspec
|
@ -1 +1,2 @@
|
|||
--color
|
||||
--order rand
|
||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue