1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara/rspec/features.rb
Jonas Nicklas and Nicklas Ramhöj 7fb5a1da3a Merge remote branch 'cavalle/object_pollution'
Conflicts:
	spec/rspec/features_spec.rb
2011-03-31 18:05:58 +02:00

22 lines
497 B
Ruby

module Capybara
module Features
def self.included(base)
base.instance_eval do
alias :background :before
alias :scenario :it
end
end
end
end
def self.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)
end
RSpec.configuration.include Capybara::Features, :capybara_feature => true