sporkrb/spork — Issue #161: Error when running routes test
Author: semaperepelitsa
Created: 2011-12-14 04:25:18+00:00
State: open

Example app: https://github.com/semaperepelitsa/spork_rails_app

```ruby
# routes
SporkRailsApp::Application.routes.draw do
resources :categories
end

# test/unit/routes_test.rb
require 'test_helper'

class RoutesTest < ActionController::TestCase
def test_root
assert_generates 'categories', controller: 'categories', action: "index"
end
end

# Gemfile
group :test do
gem 'spork', '~> 0.9.0.rc9'
gem 'spork-testunit', git: "git://github.com/sporkrb/spork-testunit.git"
end
```

```
$ ruby -v
ruby 1.9.3p0

$ rake test:units
# pass
$ testdrb -Itest test/unit/routes_test.rb
1) Error:
test_root(RoutesTest):
RuntimeError: route set not finalized
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:217:in `generate'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:453:in `generate'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:494:in `generate'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/routing/route_set.rb:490:in `generate_extras'
/Users/sema/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/actionpack-3.1.3/lib/action_dispatch/testing/assertions/routing.rb:83:in `assert_generates'
/Users/sema/Code/spork_rails_app/test/unit/routes_test.rb:5:in `test_root'
```