mirror of
https://github.com/teamcapybara/capybara.git
synced 2022-11-09 12:08:07 -05:00
7fb5a1da3a
Conflicts: spec/rspec/features_spec.rb
22 lines
497 B
Ruby
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
|