Browse files

set rspec type to :feature instead

  • Loading branch information...
1 parent 7fa75e5 commit de34c638354c117f20269b4fd129c2657b01ef12 @jnicklas committed Sep 7, 2012
Showing with 4 additions and 6 deletions.
  1. +2 −4 lib/capybara/rspec.rb
  2. +1 −1 lib/capybara/rspec/features.rb
  3. +1 −1 spec/rspec_spec.rb
View
6 lib/capybara/rspec.rb
@@ -5,10 +5,8 @@
require 'capybara/rspec/features'
RSpec.configure do |config|
- config.include Capybara::DSL, :type => :request
- config.include Capybara::DSL, :type => :acceptance
- config.include Capybara::RSpecMatchers, :type => :request
- config.include Capybara::RSpecMatchers, :type => :acceptance
+ config.include Capybara::DSL, :type => :feature
+ config.include Capybara::RSpecMatchers, :type => :feature
# The before and after blocks must run instantaneously, because Capybara
# might not actually be used in all examples where it's included.
config.after do
View
2 lib/capybara/rspec/features.rb
@@ -12,7 +12,7 @@ def self.included(base)
def self.feature(*args, &block)
options = if args.last.is_a?(Hash) then args.pop else {} end
options[:capybara_feature] = true
- options[:type] = :request
+ options[:type] = :feature
options[:caller] ||= caller
args.push(options)
View
2 spec/rspec_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe 'capybara/rspec', :type => :request do
+describe 'capybara/rspec', :type => :feature do
it "should include Capybara in rspec" do
visit('/foo')
page.body.should include('Another World')

0 comments on commit de34c63

Please sign in to comment.