Skip to content

Commit

Permalink
After thinking about it, there is nothing "engine specific" about any…
Browse files Browse the repository at this point in the history
… of this new code. Therefore, no need to have engine specific specs.
  • Loading branch information
justinko committed Jun 24, 2012
1 parent cf11980 commit dbbec24
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 63 deletions.
2 changes: 1 addition & 1 deletion spec/rspec/rails/configuration_spec.rb
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions spec/rspec/rails/example/controller_example_group_spec.rb
Expand Up @@ -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
11 changes: 0 additions & 11 deletions spec/rspec/rails/example/mailer_example_group_spec.rb
Expand Up @@ -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
14 changes: 0 additions & 14 deletions spec/rspec/rails/example/routing_example_group_spec.rb
Expand Up @@ -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
11 changes: 0 additions & 11 deletions spec/spec_helper.rb
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions spec/support/engine_example.rb

This file was deleted.

0 comments on commit dbbec24

Please sign in to comment.