Sha256: 649cf5b8e4d5d747a7abb238c410d8bb399a646137be0be6a53aa39e0210a6c9

Contents?: true

Size: 1.07 KB

Versions: 8

Compression:

Stored size: 1.07 KB

Contents

$LOAD_PATH.unshift(File.dirname(__FILE__))

# Configure Rails Environment
ENV["RAILS_ENV"] = "test"

require File.expand_path("../dummy/config/environment.rb",  __FILE__)
require "rspec/rails"
require 'capybara/rspec'
require 'capybara/rails'
require 'pry'

silence_warnings{ IRB = Pry }

ActionMailer::Base.delivery_method = :test
ActionMailer::Base.perform_deliveries = true
ActionMailer::Base.default_url_options[:host] = "test.com"

Rails.backtrace_cleaner.remove_silencers!

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }


RSpec.configure do |config|

  config.include RSpec::Integration::CapybaraSessions, :type => :request

  config.before(:all) do
    # Ensure that each test starts with a clean connection
    # Necessary as some tests will leak things like current_schema into the next test
    ActiveRecord::Base.clear_all_connections!
  end

  config.after(:each) do
    Apartment.reset
  end

end

# Load shared examples, must happen after configure for RSpec 3
Dir["#{File.dirname(__FILE__)}/examples/**/*.rb"].each { |f| require f }

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
apartment-0.20.0 spec/spec_helper.rb
apartment-0.19.0 spec/spec_helper.rb
apartment-0.18.0 spec/spec_helper.rb
apartment-0.17.3 spec/spec_helper.rb
apartment-0.17.2 spec/spec_helper.rb
apartment-0.17.1 spec/spec_helper.rb
apartment-0.17.0 spec/spec_helper.rb
apartment-0.16.0 spec/spec_helper.rb