Sha256: 7c7c6ee679c24ee3351b29fbcbbe82fa360fe9c2d89eabb208f6fd0c80bf90a7
Contents?: true
Size: 697 Bytes
Versions: 1
Compression:
Stored size: 697 Bytes
Contents
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! alias :feature :describe 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) #call describe on RSpec in case user has expose_dsl_globally set to false RSpec.describe(*args, &block) end RSpec.configuration.include Capybara::Features, :capybara_feature => true
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
capybara-2.3.0 | lib/capybara/rspec/features.rb |