Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

After thinking about it, there is nothing "engine specific" about any…

… of this new code. Therefore, no need to have engine specific specs.
  • Loading branch information...
commit dbbec246c2dbe1436eb77c8cbfe8b350929ecb2e 1 parent cf11980
@justinko justinko authored
View
2  spec/rspec/rails/configuration_spec.rb
@@ -31,7 +31,7 @@
end
describe '#application=' do
- context 'for Rails 3.0', :not_at_least_rails_3_1 do
+ context 'for Rails 3.0', :unless => RSpec::Rails.at_least_rails_3_1? do
it 'raises an error' do
expect { RSpec.configuration.application = ::Rails.application }.to raise_error
end
View
13 spec/rspec/rails/example/controller_example_group_spec.rb
@@ -96,18 +96,5 @@ module RSpec::Rails
controller_class.superclass.should eq(ApplicationController)
end
end
-
- describe "custom application", :at_least_rails_3_1 do
- it "delegates named routes to the underlying controller" do
- controller = double('controller')
- controller.stub(:bars_path).and_return('/foos')
-
- example = group.new
- example.stub(:controller => controller)
-
- example.instance_variable_set(:@orig_routes, RSpec.configuration.application.routes)
- example.bars_path.should eq('/foos')
- end
- end
end
end
View
11 spec/rspec/rails/example/mailer_example_group_spec.rb
@@ -17,16 +17,5 @@ module ::Rails; end
end
group.metadata[:type].should eq(:mailer)
end
-
- describe "custom application", :at_least_rails_3_1 do
- it "includes the custom application's url helpers" do
- group = RSpec::Core::ExampleGroup.describe do
- include MailerExampleGroup
- end
-
- example = group.new
- example.bars_path.should == '/bars'
- end
- end
end
end
View
14 spec/rspec/rails/example/routing_example_group_spec.rb
@@ -28,19 +28,5 @@ module RSpec::Rails
example.foo_path.should == "foo"
end
end
-
- describe "custom application", :at_least_rails_3_1 do
- it "provides routes of the custom application" do
- group = RSpec::Core::ExampleGroup.describe do
- include RoutingExampleGroup
- end
-
- example = group.new
-
- # Because this relies on before hooks, I have to stub this in.
- example.stub(:routes => RSpec.configuration.application.routes)
- example.bars_path.should == "/bars"
- end
- end
end
end
View
11 spec/spec_helper.rb
@@ -19,17 +19,6 @@ def self.run_all(reporter=nil)
RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.filter_run :focus
- if RSpec::Rails.at_least_rails_3_1?
- config.filter_run_excluding :not_at_least_rails_3_1
- config.around(:each, :at_least_rails_3_1) do |example|
- orig_application = RSpec.configuration.application
- RSpec.configuration.application = RSpec::EngineExample
- example.run
- RSpec.configuration.application = orig_application
- end
- else
- config.filter_run_excluding :at_least_rails_3_1
- end
config.run_all_when_everything_filtered = true
config.before(:each) do
@real_world = RSpec.world
View
13 spec/support/engine_example.rb
@@ -1,13 +0,0 @@
-module RSpec
- class EngineExample < ::Rails::Engine
- def self.activate
- end
- end
-
- if RSpec::Rails.at_least_rails_3_1?
- EngineExample.routes.draw do
- root :to => "foo#index"
- resources :bars
- end
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.