Merge remote branch 'cavalle/object_pollution'
Conflicts: spec/rspec/features_spec.rb
This commit is contained in:
commit
7fb5a1da3a
|
@ -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
|
||||||
|
|
|
@ -28,10 +28,14 @@ feature "Capybara's feature DSL" do
|
||||||
scenario "runs background" do
|
scenario "runs background" do
|
||||||
@in_background.should be_true
|
@in_background.should be_true
|
||||||
end
|
end
|
||||||
|
|
||||||
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 New Issue