Pass `feature` caller to `describe`
This commit is contained in:
parent
6f2e8c547b
commit
d5b5847334
|
@ -13,6 +13,7 @@ def feature(*args, &block)
|
|||
options = if args.last.is_a?(Hash) then args.pop else {} end
|
||||
options[:capybara_feature] = true
|
||||
options[:type] = :request
|
||||
options[:caller] ||= caller
|
||||
args.push(options)
|
||||
|
||||
describe(*args, &block)
|
||||
|
|
|
@ -3,6 +3,10 @@ require 'capybara/rspec'
|
|||
|
||||
Capybara.app = TestApp
|
||||
|
||||
RSpec.configuration.before(:each, :example_group => {:file_path => __FILE__}) do
|
||||
@in_filtered_hook = true
|
||||
end
|
||||
|
||||
feature "Capybara's feature DSL" do
|
||||
background do
|
||||
@in_background = true
|
||||
|
@ -24,6 +28,10 @@ feature "Capybara's feature DSL" do
|
|||
scenario "runs background" do
|
||||
@in_background.should be_true
|
||||
end
|
||||
|
||||
scenario "runs hooks filtered by file path" do
|
||||
@in_filtered_hook.should be_true
|
||||
end
|
||||
end
|
||||
|
||||
feature "Capybara's feature DSL with driver", :driver => :culerity do
|
||||
|
|
Loading…
Reference in New Issue