Permalink
Browse files

This should be a writer method spec.

  • Loading branch information...
1 parent f067d8f commit 454364bd41cbd21c7fd102f31cb9f8d5ee3ccd05 @justinko justinko committed Jun 23, 2012
Showing with 9 additions and 11 deletions.
  1. +9 −11 spec/rspec/rails/configuration_spec.rb
@@ -25,17 +25,8 @@
end
describe "#application" do
-
- context "default" do
-
- it "is Rails.application by default" do
- RSpec.configuration.application.should eq(::Rails.application)
- end
-
- it "should raise an error for Rails 3.0", :not_at_least_rails_3_1 do
- expect { RSpec.configuration.application = ::Rails.application }.should raise_error
- end
-
+ it "returns Rails.application by default" do
+ RSpec.configuration.application.should eq(::Rails.application)
end
context "custom rack application", :at_least_rails_3_1 do
@@ -51,7 +42,14 @@
RSpec.configuration.application = RSpec::EngineExample
RSpec.configuration.application.should eq(RSpec::EngineExample)
end
+ end
+ end
+ describe '#application=' do
+ context 'for Rails 3.0', :not_at_least_rails_3_1 do
+ it 'raises an error' do
+ expect { RSpec.configuration.application = ::Rails.application }.to raise_error
+ end
end
end
end

0 comments on commit 454364b

Please sign in to comment.