mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
Merge remote branch 'cavalle/object_pollution'
Conflicts: spec/rspec/features_spec.rb
This commit is contained in:
commit
7fb5a1da3a
2 changed files with 6 additions and 2 deletions
|
@ -9,7 +9,7 @@ module Capybara
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def feature(*args, &block)
|
def self.feature(*args, &block)
|
||||||
options = if args.last.is_a?(Hash) then args.pop else {} end
|
options = if args.last.is_a?(Hash) then args.pop else {} end
|
||||||
options[:capybara_feature] = true
|
options[:capybara_feature] = true
|
||||||
options[:type] = :request
|
options[:type] = :request
|
||||||
|
|
|
@ -32,6 +32,10 @@ feature "Capybara's feature DSL" do
|
||||||
scenario "runs hooks filtered by file path" do
|
scenario "runs hooks filtered by file path" do
|
||||||
@in_filtered_hook.should be_true
|
@in_filtered_hook.should be_true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
scenario "doesn't pollute the Object namespace" do
|
||||||
|
Object.new.respond_to?(:feature, true).should be_false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
feature "Capybara's feature DSL with driver", :driver => :culerity do
|
feature "Capybara's feature DSL with driver", :driver => :culerity do
|
||||||
|
|
Loading…
Reference in a new issue