Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Concerted effort to increase test coverage: 86 -> 88%
- Loading branch information
Showing
7 changed files
with
109 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,35 @@ | ||
module Sidekiq | ||
module Actor | ||
|
||
module ClassMethods | ||
def trap_exit(*args) | ||
end | ||
def new_link(*args) | ||
new(*args) | ||
end | ||
end | ||
|
||
module InstanceMethods | ||
def current_actor | ||
self | ||
end | ||
def after(interval) | ||
end | ||
def alive? | ||
!@dead | ||
end | ||
def terminate | ||
@dead = true | ||
end | ||
end | ||
|
||
def self.included(klass) | ||
klass.send(:include, Celluloid) | ||
if $TESTING | ||
klass.send(:include, InstanceMethods) | ||
klass.send(:extend, ClassMethods) | ||
else | ||
klass.send(:include, Celluloid) | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters