-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
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
require 'rubygems'
require 'spork'
Spork.prefork do
require 'resque_spec/cucumber'
require 'resque_spec/scheduler'
endphone_poll_steps.rb (doesn't work)
When(/^It is time to be called$/) do
PhonePollTaker.should have_schedule_size_of(0)
Resque.enqueue_at(DateTime.now + 2.seconds, PhonePollTaker, 1) # line that fails
PhonePollTaker.should have_schedule_size_of(1)
endphone_poll_spec.rb (works)
describe PhonePoll do
it 'should be able to make a call' do
...
PhonePollTaker.should have_schedule_size_of(0)
Resque.enqueue_at(DateTime.now + 2.seconds, PhonePollTaker, 1)
PhonePollTaker.should have_schedule_size_of(1)
end
endWorks in both
Resque.enqueue(PhonePollTaker, 1)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels