spec/schedulable_spec.rb in rufus-scheduler-2.0.16 vs spec/schedulable_spec.rb in rufus-scheduler-2.0.17
- old
+ new
@@ -73,7 +73,25 @@
sleep 1.4
j.value.class.should == Rufus::Scheduler::InJob
end
+
+ class MySchedulable
+ def self.job
+ @@job
+ end
+ def self.call(job)
+ @@job = job
+ end
+ end
+
+ it 'accepts schedulable classes as second param' do
+
+ @s.in '1s', MySchedulable
+
+ sleep 1.4
+
+ MySchedulable.job.class.should == Rufus::Scheduler::InJob
+ end
end