[rspec-users] engines causing problems with mocks
dchelimsky at gmail.com
Wed May 9 12:43:57 EDT 2007
Looks like you're using mixed versions of rspec and rspec_on_rails.
before(:each) didn't really show up until 0.9, but in 0.9 there is no
Make sure to follow the install instructions on
please let us know if that helps.
On 5/9/07, David Smalley <david.smalley.lists at googlemail.com> wrote:
> As I delve further into using engines and rspec together I am
> noticing more strange issues.
> describe "Requesting /admin/collections using get" do
> controller_name :admin_collections
> before(:each) do
> it "should return a collection of collection objects" do
> get 'index'
> response.should be_success
> Gives me this error
> undefined method `callback_events' for
> plugins/engines/lib/engines/rails_extensions/dependencies.rb:139 :in
> 137 # if we managed to load a file, return true. If not, default
> to the original method.
> 138 # Note that this relies on the RHS of a boolean || not to be
> evaluated if the LHS is true.
> 139 file_loaded || require_or_load_without_engine_additions
> (file_name, const_path)
> 140 end
> 141 end
> This looks like its coming from engines - but it could just be that
> engines has assumed responsibility for loading dependencies and that
> the error is really from rspec.
> Any ideas?
> I'm very keen to work on a project to create some rspec tasks that
> cater for people wanting to use it in conjunction with engines if
> anyone else has a similar problem.
> Something along the lines of being able to say:
> rake spec:engines:an_engine
> rake spec:engines:an_engine:controllers
> rake spec:engines:an_engine:models
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users