`controller` doesn't exist yet #1

Open
dchelimsky opened this Issue Jan 17, 2012 · 1 comment

2 participants

@dchelimsky

The problem is that the before hook declared in the spec_helper gets eval'd before Rails' setup_controller_request_and_response is eval'd. See rspec/rspec-rails#391.

@FooBarWidget

Interesting, I had a suspicion that that doesn't work as I expected. However it's not just merely an issue of controller being nil in the global before :each: if I access controller at all it will mutate some kind state which causes the entire test to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment