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

23 lines
497 B
Ruby
Raw Normal View History

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
2011-03-13 09:31:04 -04:00
options[:caller] ||= caller
args.push(options)
describe(*args, &block)
end
RSpec.configuration.include Capybara::Features, :capybara_feature => true