mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
cd4327857b
Just use a regular alias for now.
25 lines
581 B
Ruby
25 lines
581 B
Ruby
module Capybara
|
|
module Features
|
|
def self.included(base)
|
|
base.instance_eval do
|
|
alias :background :before
|
|
alias :scenario :it
|
|
alias :xscenario :xit
|
|
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
|
|
options[:type] = :feature
|
|
options[:caller] ||= caller
|
|
args.push(options)
|
|
|
|
describe(*args, &block)
|
|
end
|
|
|
|
RSpec.configuration.include Capybara::Features, :capybara_feature => true
|