Sha256: 514c4a3cc3d1744d0a19bda63274e0815e8b79ca39a8af9ccf234ffc11a7e6a8
Contents?: true
Size: 923 Bytes
Versions: 1
Compression:
Stored size: 923 Bytes
Contents
exit unless jruby? require 'torquebox/messaging' require 'torquebox/messaging/backgroundable' require 'torquebox/core' #java_import 'org.torquebox.core.util.StringUtils' require 'test_workers' describe TestWorker do it_behaves_like "a worker" it { should be_a ::TorqueBox::Messaging::Backgroundable} end describe MultiWorker do context "when TorqueBox::Messaging::Backgroundable is loaded" do it "defaults to the :sidekiq adapter" do MultiWorker.default_adapter.should == :torquebox_backgroundable end end context "when using the :torquebox_backgroundable adapter" do it "puts a message on the queue" do #@queue.should_receive(:publish).exactly(2).times TorqueBox::Messaging::Backgroundable::Util.should_receive(:publish_message).exactly(2).times TestWorker.perform_async("foo") MultiWorker.enqueue(TestWorker, "foo") end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
multi_worker-0.1.0 | spec/adapters/torquebox_backgroundable_spec.rb |