Sha256: 614814e82d5d62c9ce854cf36874a7f022bee405c5ef950140463fec16ace84e
Contents?: true
Size: 1.43 KB
Versions: 3
Compression:
Stored size: 1.43 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/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 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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
alchemy_cms-2.2.2 | spec/spec_helper.rb |
alchemy_cms-2.2.1 | spec/spec_helper.rb |
alchemy_cms-2.2.0 | spec/spec_helper.rb |