I’m having a devil of a time getting some global before behavior to work
the way I think it should.
I have a set of controllers that are used only by administrative users,
so login is required. To run examples just against the functionality,
ideally I’d like to be able to set up a before() that would log an admin
user in before each example.
I tried putting it in as a global in spec_helper.rb:
Spec::Runner.configure do |config|
@admin_user = Factory(:admin_user)
but it really seems like it’s being executed in the configure context,
not the controller context (for example, session isn’t defined yet,