Sha256: 7c8a33fe856f83b30998a80993e4ec268dc7756244082808410011d931ba96d9
Contents?: true
Size: 1.25 KB
Versions: 12
Compression:
Stored size: 1.25 KB
Contents
require 'rubygems' require 'bundler/setup' # Configure Rails Envinronment ENV["RAILS_ENV"] = "test" require 'rails' require 'rails/test_help' require 'stringio' require 'pathname' require 'derailed_benchmarks' require File.expand_path("../rails_app/config/environment.rb", __FILE__) require "rails/test_help" ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true ActionMailer::Base.default_url_options[:host] = "test.com" Rails.backtrace_cleaner.remove_silencers! # Configure capybara for integration testing require "capybara/rails" Capybara.default_driver = :rack_test Capybara.default_selector = :css # Run any available migration ActiveRecord::Migrator.migrate File.expand_path("../rails_app/db/migrate/", __FILE__) # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } class ActiveSupport::IntegrationCase def assert_has_content?(content) assert has_content?(content), "Expected #{page.body} to include #{content.inspect}" end end def fixtures_dir(name = "") root_path("test/fixtures").join(name) end def root_path(name = "") Pathname.new(File.expand_path("../..", __FILE__)).join(name) end def rails_app_path(name = "") root_path("test/rails_app").join(name) end
Version data entries
12 entries across 12 versions & 1 rubygems