Skip to content

Instantly share code, notes, and snippets.

@lukeredpath
Forked from xaviershay/half_rspec_rails.rb
Created June 29, 2012 16:04
Show Gist options
  • Save lukeredpath/3018834 to your computer and use it in GitHub Desktop.
Save lukeredpath/3018834 to your computer and use it in GitHub Desktop.
For GOOS + Rails
# By default, rspec/rails tags all specs in spec/integration as request specs,
# which is not what we want. There does not appear to be a way to disable this
# behaviour, so this file is a copy of rspec/rails.rb with this default
# behaviour commented out.
require 'rspec/core'
RSpec::configure do |c|
c.backtrace_clean_patterns << /vendor\//
c.backtrace_clean_patterns << /lib\/rspec\/rails/
end
require 'rspec/rails/extensions'
require 'rspec/rails/view_rendering'
require 'rspec/rails/adapters'
require 'rspec/rails/matchers'
require 'rspec/rails/fixture_support'
require 'rspec/rails/mocks'
require 'rspec/rails/module_inclusion'
require 'rspec/rails/vendor/capybara'
require 'rspec/rails/vendor/webrat'
# Added the below, we still want access to the ControllerExampleGroup
require 'rspec/rails/example/rails_example_group'
require 'rspec/rails/example/controller_example_group'
require 'rspec/rails/example/helper_example_group'
RSpec::configure do |c|
c.include RSpec::Rails::ControllerExampleGroup, :type => :controller
c.include RSpec::Rails::HelperExampleGroup, :type => :helper
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment