rspec/rspec-rails — pull request #1260 by yujinakayama (2014-12-28 10:05:58+00:00)
Title: Fix error with inheritance of outer group's anonymous controller

This fixes an error raised with the following spec:

```ruby
require 'rails_helper'

describe ApplicationController do
controller do
def index
head status
end
end

context 'when #status returns 200' do
controller(controller_class) do # Inheriting the outer group's anonymous controller
def status
200
end
end

it 'returns status 200' do
expect(get(:index).status).to eq(200)
end
end
end
```

and run:

```bash
$ bundle exec rspec
F

Failures:

1) ApplicationController when #status returns 200 returns status 200
Failure/Error: Unable to find matching line from backtrace
ArgumentError:
'#' is not a supported controller name. This can lead to potential routing problems. See http://guides.rubyonrails.org/routing.html#specifying-a-controller-to-use
# /Users/me/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/mapper.rb:249:in `default_controller_and_action'
# /Users/me/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/mapper.rb:117:in `normalize_options!'
# /Users/me/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/actionpack-4.1.8/lib/action_dispatch/routing/mapper.rb:65:in `initialize'
```

FYI the spec was passing on RSpec 2.14, though I'm not sure whether the support for inheritance of anonymous controller was intentional.