Sha256: 3a1b2dbdf1016a2283a3e890159cb1b02b41786760eb2b7032a51a30910cff7c

Contents?: true

Size: 1.05 KB

Versions: 9

Compression:

Stored size: 1.05 KB

Contents

# Create Rails environment based on the version given from Appraisal
TESTAPP_ROOT = File.join(File.dirname(__FILE__), '..', 'tmp', 'aruba', 'testapp')
FileUtils.rm_rf(TESTAPP_ROOT) if File.exists?(TESTAPP_ROOT)
`rails new #{TESTAPP_ROOT}`

ENV['RAILS_ENV'] = 'test'
ENV['BUNDLE_GEMFILE'] ||= TESTAPP_ROOT + '/Gemfile'

require "#{TESTAPP_ROOT}/config/environment"
require 'bourne'
require 'shoulda-matchers'
require 'rspec/rails'

PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')).freeze

$LOAD_PATH << File.join(PROJECT_ROOT, 'lib')

Dir[File.join(PROJECT_ROOT, 'spec', 'support', '**', '*.rb')].each { |file| require(file) }

# Run the migrations
ActiveRecord::Migration.verbose = false
ActiveRecord::Migrator.migrate(Rails.root.join('db/migrate'))

RSpec.configure do |config|
  config.mock_with :mocha
  config.include Shoulda::Matchers::ActionController,
                 :example_group => { :file_path => /action_controller/ }
  config.include Shoulda::Matchers::ActionMailer,
                 :example_group => { :file_path => /action_mailer/ }
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
challah-1.0.0.beta3 vendor/bundle/gems/shoulda-matchers-1.5.6/spec/spec_helper.rb
challah-1.0.0.beta2 vendor/bundle/gems/shoulda-matchers-1.5.6/spec/spec_helper.rb
challah-1.0.0.beta vendor/bundle/gems/shoulda-matchers-1.5.6/spec/spec_helper.rb
shoulda-matchers-1.5.6 spec/spec_helper.rb
shoulda-matchers-1.5.5 spec/spec_helper.rb
shoulda-matchers-1.5.4 spec/spec_helper.rb
shoulda-matchers-1.5.2 spec/spec_helper.rb
shoulda-matchers-1.5.1 spec/spec_helper.rb
shoulda-matchers-1.5.0 spec/spec_helper.rb