Sha256: 5faf58db00b9b2925a65d979d0f49cad33e5b36e8fae8b2e6defbfdada339166

Contents?: true

Size: 838 Bytes

Versions: 5

Compression:

Stored size: 838 Bytes

Contents

$LOAD_PATH << File.expand_path('../../lib', __FILE__)

ENV['RAILS_ENV'] ||= 'test'

# Load the Rails environment and testing framework
require File.expand_path('../app_root/config/environment', __FILE__)
require 'query_diet'

MissingSourceFile::REGEXPS << [/^cannot load such file -- (.+)$/i, 1] # Ruby 1.9 vs Rails 2.3 fix

require 'spec/rails'
require 'webrat/integrations/rspec-rails'

# Undo changes to RAILS_ENV
silence_warnings {RAILS_ENV = ENV['RAILS_ENV']}

FileUtils.rm(Dir.glob("#{Rails.root}/db/*.db"), :force => true)

# Run the migrations
ActiveRecord::Migration.verbose = false
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")

Spec::Runner.configure do |config|
  config.use_transactional_fixtures = true
  config.use_instantiated_fixtures  = false
  config.include(Webrat::Matchers, :type => [:integration])
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
query_diet-0.5.3 spec/rails-2.3/spec_helper.rb
query_diet-0.5.2 spec/rails-2.3/spec_helper.rb
query_diet-0.5.1 spec/rails-2.3/spec_helper.rb
query_diet-0.5.0 spec/rails-2.3/spec_helper.rb
query_diet-0.4.0 spec/rails-2.3/spec_helper.rb