[rspec-users] controller filters running twice in 1.1.4?
pergesu at gmail.com
Tue Jun 3 22:07:46 EDT 2008
On Tue, Jun 3, 2008 at 5:31 PM, Matt McNeil <nabble at mattmcneil.org> wrote:
> since upgrading to 1.1.4 (I had been running without issue on a git
> snapshot), I'm noticing that my filter actions initiated from application.rb
> seem to be running twice. I created a test rails project with the rspec
> scaffold and am also seeing the same behavior here too.
> Adding this code to application.rb:
> before_filter :foo
> def foo
> and an example in users_controller_spec.rb:
> it "should call foo via a before filter" do
> results in this:
> Spec::Mocks::MockExpectationError in 'UsersController handling GET
> /users.xml should call foo'
> Mock 'UsersController' expected :foo with (any args) once, but received it
> Is any one else seeing this?
Can you put a print statement inside application.rb to see if the file
itself is being loaded multiple times?
More information about the rspec-users