Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Capybara feature specs may use Rails URL helpers"

This reverts commit 96e1c33.

* We'll instead use an implementation that adds a proper
  FeatureExampleGroup (see #632)
  • Loading branch information...
commit 1152131adccb5aa7f941e17dea534e2ec742d009 1 parent 3865507
alindeman alindeman authored
1  lib/rspec/rails.rb
View
@@ -13,6 +13,5 @@
require 'rspec/rails/mocks'
require 'rspec/rails/module_inclusion'
require 'rspec/rails/example'
-require 'rspec/rails/url_helpers'
require 'rspec/rails/vendor/capybara'
require 'rspec/rails/vendor/webrat'
19 lib/rspec/rails/url_helpers.rb
View
@@ -1,19 +0,0 @@
-module RSpec::Rails
- module UrlHelpers
- DEFAULT_HOST = "www.example.com"
-
- def self.included(base)
- app = ::Rails.application
- if app.respond_to?(:routes)
- base.class_eval do
- include app.routes.url_helpers if app.routes.respond_to?(:url_helpers)
- include app.routes.mounted_helpers if app.routes.respond_to?(:mounted_helpers)
- end
-
- if base.respond_to?(:default_url_options)
- base.default_url_options[:host] ||= ::RSpec::Rails::UrlHelpers::DEFAULT_HOST
- end
- end
- end
- end
-end
4 lib/rspec/rails/vendor/capybara.rb
View
@@ -35,9 +35,5 @@
c.include Capybara, :type => :request
c.include Capybara, :type => :controller
end
-
- c.include RSpec::Rails::UrlHelpers, :type => :feature, :example_group => {
- :file_path => c.escaped_path(%w[spec features])
- }
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.