rake test task fails on prepend_before_filter
Reported by Joe Van Dyk | July 28th, 2008 @ 06:27 PM
** Invoke hoptoad:test (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute hoptoad:test
Setting up the Controller.
rake aborted!
undefined method `prepend_before_filter' for ApplicationController:Class
/Users/joe/projects/tanga/vendor/plugins/hoptoad_notifier/tasks/hoptoad_notifier_tasks.rake:19
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in `invoke_with_call_chain'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `synchronize'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in `invoke_with_call_chain'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in `invoke_task'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in `standard_exception_handling'
/standard-rails/install//lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
/standard-rails/install/bin/rake:31
Comments and changes to this ticket
-
Jon Yurek July 29th, 2008 @ 09:44 AM
- → State changed from new to open
- → Tag changed from to bug hoptoad_notifier rake
- → Assigned user changed from to Jon Yurek
Hi, thanks for the bug report. That's strange that ApplicationController would be defined but not prepend_before_fiter.
What version of Rails are you running? We're only supporting 2.0 and up for our notifier plugin.
What gems and plugins are you using with that app? Perhaps something is interfering.
-
Kenneth Kalmer July 30th, 2008 @ 08:57 AM
I got the same issue (I assume the original reporter is also running 2.0.2, just like I have).
I fixed the issue by editing the rake task and adding a "require 'application'" just before "require 'action_controller/test_process'".
Shouldn't the stub application controller in the rake task also inherit from ActionController::Base?
-
Jon Yurek July 30th, 2008 @ 09:08 AM
It shouldn't need to, since ApplicationController should already be defined and you don't need to re-specify superclasses when opening a class back up.
I guess in 2.0.* putting a dependency on the :environment task isn't enough to get the ApplicationController included.
Thanks. I'll get that in and verify it works with 2.0.2.
-
Jon Yurek July 30th, 2008 @ 05:13 PM
- → State changed from open to resolved
I've updated the notifier plugin and it should work out of the box on 2.0.2, as well as 1.2.6. On 1.2.6 the testing rake task won't work until you copy the hoptoad_notifier_tasks.rake into your app's lib/tasks directory, though.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
