Sha256: 29cc579c68745059a28c22e4476766768c42eda8a0f85e6986c25e393eb2139d
Contents?: true
Size: 1.4 KB
Versions: 3
Compression:
Stored size: 1.4 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' Capybara.default_driver = :rack_test Capybara.default_selector = :css Capybara.javascript_driver = :webkit # 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! 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.rc3 | spec/spec_helper.rb |
alchemy_cms-2.2.rc2 | spec/spec_helper.rb |
alchemy_cms-2.2.rc1 | spec/spec_helper.rb |