title: How to access controller instance inside the RSpec integration test using Capybara
body: <p>I am building an engine for Rails 3.1 and so far it's fine.</p>
  
  <p>But I am trying to make the configuration of the engine much more generic through the configuration.</p>
  
  <p>e.g. The main app has to write the method using a symbol.</p>
  
  <pre><code># app/config/initializers/my_engine.rb
  MyEngine::Engine.login_url = :sign_in_url
  </code></pre>
  
  <p>And to test it via Rpec, I'm writing a RSpec integration spec.</p>
  
  <pre><code>...
  page.current_url.should eql(send(MyEngine::Engine.login_url))
  </code></pre>
  
  <p>And the above fails saying <code>NoMethod error...</code>
  Actually I want to call that <code>send(...)</code> on the controller instance of the main app.</p>
  
  <p>A couple of weeks ago, with Rails3.1.rc..., it was passing, but now it's failing.</p>
  
  <p>So. the question is: how can I call that method on the controller instance in an RSpec/Capybara integration spec? Or am I doing it the wrong way?</p>