Sha256: eb0631ab8e21a5b90e3f5277ea4056b11d0f2122f5517879b3a8a58054d30119
Contents?: true
Size: 1.45 KB
Versions: 6
Compression:
Stored size: 1.45 KB
Contents
begin require 'spork' rescue LoadError => e end def configure # Configure Rails Environment ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) require 'database_cleaner' DatabaseCleaner.strategy = :truncation require 'authlogic/test_case' include Authlogic::TestCase require "rails/test_help" require "rspec/rails" require 'factory_girl' require 'factories.rb' 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" require 'capybara-webkit' unless ENV['CI'] Capybara.default_driver = :rack_test Capybara.default_selector = :css Capybara.javascript_driver = :webkit unless ENV['CI'] # Load support files Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f } RSpec.configure do |config| require 'rspec/expectations' config.include RSpec::Matchers config.include Alchemy::Engine.routes.url_helpers config.mock_with :rspec config.use_transactional_fixtures = true end end def seed # This code will be run each time you run your specs. DatabaseCleaner.clean # Seed the database Alchemy::Seeder.seed! ::I18n.locale = :en end if defined?(Spork) Spork.prefork { configure } Spork.each_run { seed } else configure seed end
Version data entries
6 entries across 6 versions & 1 rubygems