Sha256: 9a91572abdf0b1ffc2513d307358d4546c4d5d11849335bd6920d515a5ca7ea0

Contents?: true

Size: 1.07 KB

Versions: 28

Compression:

Stored size: 1.07 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 'rspec'
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}/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

28 entries across 20 versions & 4 rubygems

Version Path
challah-1.0.0.beta vendor/bundle/gems/shoulda-matchers-1.4.2/spec/spec_helper.rb
challah-0.9.1.beta.3 vendor/bundle/gems/shoulda-matchers-1.4.2/spec/spec_helper.rb
devise_sociable-0.1.0 vendor/bundle/gems/shoulda-matchers-1.4.2/spec/spec_helper.rb
challah-0.9.1.beta vendor/bundle/gems/shoulda-matchers-1.4.2/spec/spec_helper.rb
challah-0.9.0 vendor/bundle/gems/shoulda-matchers-1.4.2/spec/spec_helper.rb
shoulda-matchers-1.4.2 spec/spec_helper.rb
challah-rolls-0.2.0 vendor/bundle/gems/shoulda-matchers-1.4.1/spec/spec_helper.rb
challah-rolls-0.2.0 vendor/bundle/gems/shoulda-matchers-1.3.0/spec/spec_helper.rb
challah-rolls-0.2.0 vendor/bundle/gems/shoulda-matchers-1.2.0/spec/spec_helper.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/shoulda-matchers-1.4.1/spec/spec_helper.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/shoulda-matchers-1.2.0/spec/spec_helper.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/shoulda-matchers-1.3.0/spec/spec_helper.rb
challah-0.8.3 vendor/bundle/gems/shoulda-matchers-1.3.0/spec/spec_helper.rb
challah-0.8.3 vendor/bundle/gems/shoulda-matchers-1.4.1/spec/spec_helper.rb
shoulda-matchers-1.4.1 spec/spec_helper.rb
shoulda-matchers-1.4.0 spec/spec_helper.rb
challah-0.8.1 vendor/bundle/gems/shoulda-matchers-1.3.0/spec/spec_helper.rb
challah-rolls-0.1.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/shoulda-matchers-1.2.0/spec/spec_helper.rb
challah-rolls-0.1.0 vendor/bundle/gems/shoulda-matchers-1.2.0/spec/spec_helper.rb
challah-rolls-0.1.0 vendor/bundle/gems/shoulda-matchers-1.3.0/spec/spec_helper.rb