Sha256: 90c107e8ace1b43dc402c56ce492d82ff533d0634cf08fd7d5500a4e4ffe4cf7

Contents?: true

Size: 981 Bytes

Versions: 12

Compression:

Stored size: 981 Bytes

Contents

begin
  require 'capybara/rspec'
rescue LoadError
end

begin
  require 'capybara/rails'
rescue LoadError
end

if defined?(Capybara)
  require 'rspec/support/comparable_version'
  unless RSpec::Support::ComparableVersion.new(Capybara::VERSION) >= '2.2.0'
    raise "You are using capybara #{Capybara::VERSION}. RSpec requires >= 2.2.0."
  end

  RSpec.configure do |c|
    if defined?(Capybara::DSL)
      c.include Capybara::DSL, :type => :feature
    end

    if defined?(Capybara::RSpecMatchers)
      c.include Capybara::RSpecMatchers, :type => :view
      c.include Capybara::RSpecMatchers, :type => :helper
      c.include Capybara::RSpecMatchers, :type => :mailer
      c.include Capybara::RSpecMatchers, :type => :controller
      c.include Capybara::RSpecMatchers, :type => :feature
    end

    unless defined?(Capybara::RSpecMatchers) || defined?(Capybara::DSL)
      c.include Capybara, :type => :request
      c.include Capybara, :type => :controller
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
rspec-rails-3.6.1 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.6.0 lib/rspec/rails/vendor/capybara.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/rspec-rails-3.5.2/lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.6.0.beta2 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.6.0.beta1 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.2 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.1 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.0 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.0.beta4 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.0.beta3 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.0.beta2 lib/rspec/rails/vendor/capybara.rb
rspec-rails-3.5.0.beta1 lib/rspec/rails/vendor/capybara.rb