Merge remote branch 'cavalle/object_pollution'

Conflicts:
	spec/rspec/features_spec.rb
This commit is contained in:
Jonas Nicklas and Nicklas Ramhöj 2011-03-31 18:05:58 +02:00
commit 7fb5a1da3a
2 changed files with 6 additions and 2 deletions

View File

@ -9,7 +9,7 @@ module Capybara
end
end
def feature(*args, &block)
def self.feature(*args, &block)
options = if args.last.is_a?(Hash) then args.pop else {} end
options[:capybara_feature] = true
options[:type] = :request

View File

@ -32,6 +32,10 @@ feature "Capybara's feature DSL" do
scenario "runs hooks filtered by file path" do
@in_filtered_hook.should be_true
end
scenario "doesn't pollute the Object namespace" do
Object.new.respond_to?(:feature, true).should be_false
end
end
feature "Capybara's feature DSL with driver", :driver => :culerity do