Sha256: 891a8f8b5f470a4d356110a1f57796309a2f3feb0af1033cc87c80158bdafc8a
Contents?: true
Size: 1.67 KB
Versions: 4
Compression:
Stored size: 1.67 KB
Contents
begin require 'simplecov' SimpleCov.start('rails') do add_filter "/spec/" end rescue LoadError => e end 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 '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! # Disable rails loggin for faster IO. Remove this if you want to have a test.log Rails.logger.level = 4 # Configure capybara for integration testing require "capybara/rails" require 'capybara/poltergeist' Capybara.default_driver = :rack_test Capybara.default_selector = :css Capybara.javascript_driver = :poltergeist # 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 # Make sure the database is clean and ready for test config.before(:suite) do truncate_all_tables Alchemy::Seeder.seed! end # Ensuring that the locale is always resetted to :en before running any tests config.before(:each) do ::I18n.locale = :en end end end if defined?(Spork) Spork.prefork { configure } else configure end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-2.4.0 | spec/spec_helper.rb |
alchemy_cms-2.4.rc4 | spec/spec_helper.rb |
alchemy_cms-2.4.rc2 | spec/spec_helper.rb |
alchemy_cms-2.4.rc1 | spec/spec_helper.rb |