Sha256: a6a14aaf9e41ba959867374dc085f9f6410b7072913fd8fd43499c26dfa45c66

Contents?: true

Size: 969 Bytes

Versions: 6

Compression:

Stored size: 969 Bytes

Contents

require 'rubygems'
require 'spork'
Spork.prefork do
  ENV["RAILS_ENV"] ||= 'test'
  require File.expand_path("../../config/environment", __FILE__)
  require 'rspec/rails'
  require 'rspec/autorun'
  require 'capybara/rspec'

  Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f}

  RSpec.configure do |config|
    config.fixture_path = "#{::Rails.root}/spec/fixtures"
    config.use_transactional_fixtures = false
    config.infer_base_class_for_anonymous_controllers = false
    config.order = "random"
    config.include FactoryGirl::Syntax::Methods
    config.include Capybara::DSL
    ActiveSupport::Dependencies.clear
  end
end


Spork.each_run do
  FactoryGirl.reload  
  Dir[File.join(File.dirname(__FILE__), '..', 'app', 'helpers', '*.rb')].each do |file|
    require file
  end
  RSpec.configure do |config|
    config.before(:each) do
      DatabaseCleaner.start
    end

    config.after(:each) do
      DatabaseCleaner.clean
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bootup-0.0.4.1 lib/generators/bootup/templates/spec_helper.rb
bootup-0.0.4 lib/generators/bootup/templates/spec_helper.rb
bootup-0.0.3 lib/generators/bootup/templates/spec_helper.rb
bootup-0.0.2 lib/generators/bootup/templates/spec_helper.rb
bootup-0.0.1 lib/generators/bootup/templates/spec_helper.rb
bootup-0.0.1alpha lib/generators/bootup/templates/spec_helper.rb