Sha256: 7f0c118ffda9d32a6c43c831cb2088f7b384231086397b89f704bcf7683a479e

Contents?: true

Size: 713 Bytes

Versions: 1

Compression:

Stored size: 713 Bytes

Contents

#
# taken from https://github.com/jnicklas/capybara/blob/master/lib/capybara/rspec/features.rb
#
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)

  describe(*args, &block)
end

RSpec.configuration.include Capybara::Features, :capybara_feature => true

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
access_policy_rails-0.0.2 spec/acceptance/support/feature.rb