Advertisement
Guest User

Untitled

a guest
Jan 11th, 2014
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rails 1.81 KB | None | 0 0
  1. require 'rubygems'
  2. require 'spork'
  3.  
  4. Spork.prefork do
  5.   ENV["RAILS_ENV"] ||= 'test'
  6.   require File.expand_path("../../config/environment", __FILE__)
  7.   require 'rspec/rails'
  8.   require 'rspec/autorun'
  9.  
  10.   # Requires supporting ruby files with custom matchers and macros, etc,
  11.   # in spec/support/ and its subdirectories.
  12.   Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}
  13.  
  14.   # Checks for pending migrations before tests are run.
  15.   # If you are not using ActiveRecord, you can remove this line.
  16.   ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
  17.  
  18.   RSpec.configure do |config|
  19.     # ## Mock Framework
  20.     #
  21.     # If you prefer to use mocha, flexmock or RR, uncomment the appropriate line:
  22.     #
  23.     # config.mock_with :mocha
  24.     # config.mock_with :flexmock
  25.     # config.mock_with :rr
  26.  
  27.     # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
  28.     config.fixture_path = "#{::Rails.root}/spec/fixtures"
  29.  
  30.     # If you're not using ActiveRecord, or you'd prefer not to run each of your
  31.     # examples within a transaction, remove the following line or assign false
  32.     # instead of true.
  33.     config.use_transactional_fixtures = true
  34.  
  35.     # If true, the base class of anonymous controllers will be inferred
  36.     # automatically. This will be the default behavior in future versions of
  37.     # rspec-rails.
  38.     config.infer_base_class_for_anonymous_controllers = false
  39.  
  40.     # Run specs in random order to surface order dependencies. If you find an
  41.     # order dependency and want to debug it, you can fix the order by providing
  42.     # the seed, which is printed after each run.
  43.     #     --seed 1234
  44.     config.order = "random"
  45.     config.include Capybara::DSL
  46.   end
  47. end
  48.  
  49. Spork.each_run do
  50.   # This code will be run each time you run your specs.
  51.  
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement