Sha256: 3804956cd4df7afdf9a3cf128365c52a9cde6526b2541f493e1f6996a374617c

Contents?: true

Size: 711 Bytes

Versions: 23

Compression:

Stored size: 711 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

23 entries across 23 versions & 3 rubygems

Version Path
activerecord_to_poro-0.0.9 spec/support/feature.rb
activerecord_to_poro-0.0.8 spec/support/feature.rb
activerecord_to_poro-0.0.7 spec/support/feature.rb
activerecord_to_poro-0.0.6 spec/support/feature.rb
activerecord_to_poro-0.0.5 spec/support/feature.rb
activerecord_to_poro-0.0.4 spec/support/feature.rb
access_policy_rails-0.0.1 spec/acceptance/support/feature.rb
yaoc-0.0.13 spec/support/feature.rb
yaoc-0.0.12 spec/support/feature.rb
activerecord_to_poro-0.0.3 spec/support/feature.rb
yaoc-0.0.11 spec/support/feature.rb
yaoc-0.0.10 spec/support/feature.rb
yaoc-0.0.9 spec/support/feature.rb
activerecord_to_poro-0.0.2 spec/support/feature.rb
activerecord_to_poro-0.0.1 spec/support/feature.rb
yaoc-0.0.8 spec/support/feature.rb
yaoc-0.0.7 spec/support/feature.rb
yaoc-0.0.6 spec/support/feature.rb
yaoc-0.0.5 spec/support/feature.rb
yaoc-0.0.4 spec/support/feature.rb