Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (37 sloc) 1.03 KB
require 'rails/all'
module RSpecRails
class Application < ::Rails::Application
end
end
require 'rspec/rails'
require 'ammeter/init'
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
class RSpec::Core::ExampleGroup
def self.run_all(reporter=nil)
run(reporter || RSpec::Mocks::Mock.new('reporter').as_null_object)
end
end
if RSpec::Rails.at_least_rails_3_1?
RSpec::EngineExample.routes.draw do
root :to => "foo#index"
resources :bars
end
end
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
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
RSpec.instance_variable_set(:@world, RSpec::Core::World.new)
end
config.after(:each) do
RSpec.instance_variable_set(:@world, @real_world)
end
config.order = :random
end
Jump to Line
Something went wrong with that request. Please try again.