Skip to content

Commit

Permalink
DG.enhance! should include Fluent and Bothback
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Stokes committed Jan 5, 2011
1 parent 946442f commit 91c650c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/deferrable_gratification.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ module DeferrableGratification
# included that module.
def self.enhance!(module_or_class)
module_or_class.send :include, Combinators
module_or_class.send :include, Fluent
module_or_class.send :include, Bothback
end

# Enhance EventMachine::Deferrable itself so that any class including it
Expand Down
2 changes: 2 additions & 0 deletions spec/deferrable_gratification/default_deferrable_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
describe DeferrableGratification::DefaultDeferrable do
it_should_behave_like 'a Deferrable'

it_should_include DeferrableGratification::Fluent
it_should_include DeferrableGratification::Bothback
it_should_include DeferrableGratification::Combinators
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ class EnhancedDeferrable < EventMachine::DefaultDeferrable
end

describe EnhancedDeferrable do
it_should_include DeferrableGratification::Fluent
it_should_include DeferrableGratification::Bothback
it_should_include DeferrableGratification::Combinators
end
end

0 comments on commit 91c650c

Please sign in to comment.