Open noreaster opened 10 years ago
Hi @noreaster,
No idea. Here are some suggestions:
The error message makes me think that you are running in a different environment. Do you have any invocations of ResqueSpec.disable_ext = true
?
Another cause may be due to the prefork
. If Resque
is loaded afterwards, the hooks will not have been set correctly by ResqueSpec
. The way to debug this is to stop inside [https://github.com/leshill/resque_spec/blob/master/lib/resque_spec/scheduler.rb#L19] and verify that you have ResqueSpec
hooked up.
A failing example would be great.
I've tried putting the requires inside and outside of the prefork and it doesn't make a difference. It is loading up the resque-scheduler rather than resque_spec for enqueue_at. However it does load up resque_spec for enqueue.
I'll try to boil down the issue into a separate example instance and post it when I sort that out.
Here's an instance of how I had it set up. https://github.com/noreaster/resque_spec_example Is there somewhere I have the configuration wrong?
The examples are: /spec/models/phone_poll_spec.rb and /features/phone_polls/test_case.feature
I was using guard to test if that makes a difference
Hi @noreaster,
Thanks for the example, the only thing I can suggest is to move the require 'resque_spec/scheduler'
to the each_run
block? I will run it myself when I have some free time later this week.
No worries, unfortunately that doesn't seem to solve the issue. It's probably a configuration issue, but I just don't know where it would be.
Hi @noreaster,
That last message was confusing :) — you are still having the problem?
Whoops, learning how to type is important. I meant that it's still a problem
I'm not quite sure what I'm doing wrong. I can get enqueue_at to work in RSpec, but not cucumber.
Resque.enqueue works properly in cucumber (and RSpec) but I always get "Invalid argument - connect(2) (Errno::EINVAL)" when I try to run Resque.enqueue_at in cucumber
.env
phone_poll_steps.rb (doesn't work)
phone_poll_spec.rb (works)
Works in both