RSpec DSL should not pollute the Object namespace
This commit is contained in:
parent
6f2e8c547b
commit
fee2a70220
|
@ -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
|
||||
|
|
|
@ -24,6 +24,10 @@ feature "Capybara's feature DSL" do
|
|||
scenario "runs background" do
|
||||
@in_background.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
|
||||
|
|
Loading…
Reference in New Issue