Permalink
Browse files

Merge pull request #62 from CaseyLeask/extract-let

Promoted variables to let in delegation spec
  • Loading branch information...
garybernhardt committed Sep 30, 2013
2 parents 336d840 + fb50f91 commit 02859a78355ce348c40d4859df13575e6cb21998
Showing with 3 additions and 3 deletions.
  1. +3 −3 spec/delegation_spec.rb
View
@@ -22,16 +22,16 @@ def self.a_method
end
describe Raptor::Delegator do
+ let(:app) { Raptor::App.new(Object) {} }
+ let(:injector) { Raptor::Injector.new([]) }
+
it "returns nil if the delegate is nil" do
- injector = Raptor::Injector.new([])
delegator = Raptor::Delegator.new(AModule, nil)
delegator.delegate(injector).should be_nil
end
it "calls the named method" do
- app = Raptor::App.new(Object) {}
delegator = Raptor::Delegator.new(app, "Hash.new")
- injector = Raptor::Injector.new([])
delegator.delegate(injector).should == {}
end
end

0 comments on commit 02859a7

Please sign in to comment.