Sha256: 65df44d3a96e9b793371a1c23f36015415200b50274cacb343a09827e62032c1

Contents?: true

Size: 581 Bytes

Versions: 9

Compression:

Stored size: 581 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!
      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

9 entries across 9 versions & 2 rubygems

Version Path
swipe-rails-0.0.5 vendor/bundle/gems/capybara-2.1.0/lib/capybara/rspec/features.rb
capybara-2.1.0 lib/capybara/rspec/features.rb
capybara-2.1.0.rc1 lib/capybara/rspec/features.rb
capybara-2.0.3 lib/capybara/rspec/features.rb
capybara-2.1.0.beta1 lib/capybara/rspec/features.rb
capybara-2.0.2 lib/capybara/rspec/features.rb
capybara-2.0.1 lib/capybara/rspec/features.rb
capybara-2.0.0 lib/capybara/rspec/features.rb
capybara-2.0.0.beta4 lib/capybara/rspec/features.rb