Ok,
fixed it, in a nutshell:
Doesnt work:
get :new, :format => :lightbox
Works:
get :new, :format => 'lightbox'
What was really confusing was that in BOTH cases the same URL appeared
in the log.
Here is my turn on what happened:
Internally - when rails sees a mime-type / format - rails
distinguishes between a string and a symbol, saying that when using
something like
respond_to do |format|
format.lightbox {}
end
"lightbox" is expected to be a string.
When doing a normal request via a browser I passed in the format in
the URL, so as a string.
When running a spec apparently this is passed directly the way I wrote
it, so as a symbol.
That's why one and the same URL worked in the browser, but not in my
spec.
Does this sound plausible?
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users