rspec/rspec-rails — Issue #469: routing specs not passing if using a namespaced engine
Author: tvdeyen
Created: 2011-12-02 09:23:09+00:00
State: open

Given a namespaced engine:

```
module Alchemy
class Engine < Rails::Engine
isolate_namespace Alchemy
engine_name 'alchemy'
end
end
```

Also given a dummy app, where the engine is mounted into a namespace:

```
Rails.application.routes.draw do
mount Alchemy::Engine => "/alchemy"
end
```

```
describe "The Routing", :type => :routing do

describe "urls for downloads" do

it "should have a named route" do
{
:get => "/alchemy/attachment/32/download/Presseveranstaltung.pdf"
}.should route_to(
:controller => "alchemy/attachments",
:action => "download",
:id => "32",
:name => "Presseveranstaltung",
:suffix => "pdf"
)
end
end
end
```

Fails!

Testing it manually inside the same dumm app. It passes!

I also tried to `include Alchemy::Engine.routes.url_helpers`

No luck :(