Permalink
Browse files

Removing some cruft.

  • Loading branch information...
1 parent 2ef22d0 commit 88349c10b3d5ed3bb90658feeb49da1371af1767 @bryckbost bryckbost committed Jan 10, 2012
Showing with 2 additions and 44 deletions.
  1. +0 −40 spec/lifecycle_spec.rb
  2. +2 −4 spec/message_sending_spec.rb
View
@@ -64,44 +64,4 @@
lifecycle.before(:execute, &callback)
expect { lifecycle.run_callbacks(:execute, 1,2,3) {} }.to raise_error(ArgumentError, /1 parameter/)
end
-
- # # This is a spectacularly crappy way to test callbacks. What's a better way?
- # describe 'arguments callbacks' do
- # subject do
- # class Testarguments < Delayed::arguments
- # def before_execute; end
- # def before_loop; end
- # def before_perform; end
- #
- # set_callback :execute, :before, :before_execute
- # set_callback :loop, :before, :before_loop
- # set_callback :perform, :before, :before_perform
- # end
- #
- # Testarguments.new.tap { |w| w.stop }
- # end
- #
- # it "should trigger for execute event" do
- # subject.should_receive(:before_execute).with()
- # subject.start
- # end
- #
- # it "should trigger for loop event" do
- # subject.should_receive(:before_loop).with()
- # subject.start
- # end
- #
- # it "should trigger for perform event" do
- # "foo".delay.length
- # subject.should_receive(:before_perform).with()
- # subject.start
- # end
- # end
- #
- # describe 'job callbacks' do
- # it "should trigger for enqueue event" do
- # pending 'figure out how to test this'
- # end
- # end
-
end
@@ -25,9 +25,7 @@ def tell!(arg)
describe 'with options' do
class Fable
- class << self
- attr_accessor :importance
- end
+ cattr_accessor :importance
def tell
end
handle_asynchronously :tell, :priority => Proc.new { self.importance }
@@ -43,7 +41,7 @@ def tell
job.priority.should == 20
end
- describe 'using a proc with parament' do
+ describe 'using a proc with parameters' do
class Yarn
attr_accessor :importance
def spin

0 comments on commit 88349c1

Please sign in to comment.