resolve/refinerycms — pull request #1421 by phiggins (2012-03-07 08:08:12+00:00)
Title: Stub login in request specs.

Like we discussed in #1413 I removed the login page request in favor of using Warden's test helpers [as described here](https://github.com/plataformatec/devise/wiki/How-To:-Test-with-Capybara). This caused a few test failures to popup, all of them in the pages/spec/requests/refinery/admin/pages_spec.rb file. I was able to workaround one test failure with the changes I made to that file, but a few persisted. The code in that spec is not the cleanest and all of the failing specs belong to one describe block, so it's possible I missed something, but I'm done monkeying with it today.

For the record, the test failures I see are these:

```
rspec ./pages/spec/requests/refinery/admin/pages_spec.rb:552 # TranslatePages Pages Link-to Dialog adding page link with relative urls shows Russian pages if we're editing the Russian locale
rspec ./pages/spec/requests/refinery/admin/pages_spec.rb:559 # TranslatePages Pages Link-to Dialog adding page link with relative urls shows default to the default locale if no query string is added
rspec ./pages/spec/requests/refinery/admin/pages_spec.rb:569 # TranslatePages Pages Link-to Dialog adding page link with absolute urls shows Russian pages if we're editing the Russian locale
rspec ./pages/spec/requests/refinery/admin/pages_spec.rb:576 # TranslatePages Pages Link-to Dialog adding page link with absolute urls shows default to the default locale if no query string is added
```

BTW, with these changes the specs took about 13 seconds (8%) less wall clock time.