blowmage / minitest-rails-capybara

Capybara integration for MiniTest::Rails
http://blowmage.com/minitest-rails-capybara
MIT License
131 stars 40 forks source link

If `test` route is defined unexpected tests will be ran #18

Closed sidonath closed 11 years ago

sidonath commented 11 years ago

After a few hours of research I have discovered that the following route definition:

Foo::Application.routes.draw do
  get 'test' => "test#index"
end

will insert additional, unexpected, tests. For example when I run rake minitest:models I get the following:

Address
     PASS (0:00:00.172) test_0001_must be valid

Capybara::Rails::TestCase
     PASS (0:00:00.814) test_path
    ERROR (0:00:00.816) test_url
          Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true

Category
     PASS (0:00:01.000) test_0001_creates child node

The Capybara::Rails::TestCase test suite is not defined anywhere. When I remove test route from routes.rb the offending tests disappear. They also disappear if I remove require "minitest/rails/capybara" from test_helper.

I don't need the particular route in my app, but it still seems like a bad bug that could burn more people :)

sidonath commented 11 years ago

This is duplicate of #14, sorry everyone