Sha256: 3b5c22cb6762d45a01385b1ca902824bc9967fa82c3afce6b1b46fcb0f192dd9
Contents?: true
Size: 1.54 KB
Versions: 1
Compression:
Stored size: 1.54 KB
Contents
require 'spork' Spork.prefork do # Configure Rails Envinronment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require "rails/test_help" require "rspec/rails" require 'factory_girl' require "capybara/rails" require 'factories' 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 Capybara.default_driver = :rack_test Capybara.default_selector = :css # Drop all records and run any available migration migrations_source = File.expand_path("../../db/migrate/", __FILE__) migrations_destination = File.expand_path("../dummy/db/", __FILE__) system "cp -R #{migrations_source} #{migrations_destination}" ActiveRecord::Base.connection.tables.each { |table| ActiveRecord::Base.connection.drop_table(table) } ActiveRecord::Migrator.migrate File.expand_path("../dummy/db/migrate/", __FILE__) # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| # Remove this line if you don't want RSpec's should and should_not # methods or matchers require 'rspec/expectations' require 'carrierwave/test/matchers' config.include RSpec::Matchers config.include CarrierWave::Test::Matchers # == Mock Framework config.mock_with :rspec config.use_transactional_fixtures = true end end Spork.each_run do end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kuhsaft-0.0.3 | spec/spec_helper.rb |