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

26 lines
581 B
Ruby
Raw Normal View History

module Capybara
module Features
def self.included(base)
base.instance_eval do
alias :background :before
alias :scenario :it
alias :xscenario :xit
2012-10-03 18:49:44 -04:00
alias :given :let
alias :given! :let!
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
2012-09-07 14:17:38 -04:00
options[:type] = :feature
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