Sha256: 4ae45e17b44a7f7c2e0c639f176bb0377edb5e2545b9910cfd88b9442b5cf9eb
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
# Configure Rails Envinronment require "spork" Spork.prefork do ENV["RAILS_ENV"] = "test" require File.expand_path("../dummy/config/environment.rb", __FILE__) #require "rails/test_help" require "rspec/rails" require 'shoulda' require 'factory_girl_rails' require 'email_spec' require 'spec_helpers/spec_helpers' require 'ssl_requirement' Dir["#{File.dirname(__FILE__)}/factories/*.rb"].each {|f| require f} 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" Capybara.default_driver = :rack_test Capybara.default_selector = :css require 'database_cleaner' # Run any available migration 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' #config.include RSpec::Matchers require 'action_mailer' include Capybara::DSL config.include(EmailSpec::Helpers) config.include(EmailSpec::Matchers) # == Mock Framework config.mock_with :rspec config.use_transactional_fixtures = false config.before(:suite) do DatabaseCleaner.strategy = :truncation end config.before(:each) do DatabaseCleaner.start end config.after(:each) do DatabaseCleaner.clean end end include Rails.application.routes.url_helpers end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
saasaparilla-0.2.2 | spec/spec_helper.rb |
saasaparilla-0.2.1 | spec/spec_helper.rb |