mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
RSpec DSL should not pollute the Object namespace
This commit is contained in:
parent
6f2e8c547b
commit
fee2a70220
2 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue