Created
May 7, 2014 17:34
-
-
Save soulcutter/bda0f8ef31e17cabba16 to your computer and use it in GitHub Desktop.
sample spec_helper in rspec-rails 2.14.2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) | |
require 'rspec/rails' | |
require 'rspec/autorun' | |
require 'capybara/rspec' | |
require 'capybara/rails' | |
# Requires supporting ruby files with custom matchers and macros, etc, | |
# in spec/support/ and its subdirectories. | |
Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} | |
RSpec.configure do |config| | |
config.mock_with :rspec | |
config.order = 'random' | |
config.treat_symbols_as_metadata_keys_with_true_values = true | |
config.infer_base_class_for_anonymous_controllers = false | |
# Extensions | |
config.include FactoryGirl::Syntax::Methods | |
config.include AttributeNormalizer::RSpecMatcher, :type => :model | |
config.use_transactional_fixtures = true | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment