Skip to content

Commit

Permalink
Remove #retruning for #tap
Browse files Browse the repository at this point in the history
  • Loading branch information
ianwhite committed Mar 14, 2011
1 parent bdbd712 commit 71ccd9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 3 additions & 3 deletions spec/pickle/adapter_spec.rb
Expand Up @@ -39,9 +39,9 @@


describe "adapters: " do describe "adapters: " do
before do before do
@klass1 = returning(Class.new(ActiveRecord::Base)) { |k| k.stub!(:name).and_return('One') } @klass1 = Class.new(ActiveRecord::Base).tap { |k| k.stub!(:name).and_return('One') }
@klass2 = returning(Class.new(ActiveRecord::Base)) { |k| k.stub!(:name).and_return('One::Two') } @klass2 = Class.new(ActiveRecord::Base).tap { |k| k.stub!(:name).and_return('One::Two') }
@klass3 = returning(Class.new(ActiveRecord::Base)) { |k| k.stub!(:name).and_return('Three') } @klass3 = Class.new(ActiveRecord::Base).tap { |k| k.stub!(:name).and_return('Three') }
end end


describe 'ActiveRecord' do describe 'ActiveRecord' do
Expand Down
8 changes: 2 additions & 6 deletions spec/pickle/session_spec.rb
Expand Up @@ -51,9 +51,7 @@ class Model


describe "extending Pickle::Session" do describe "extending Pickle::Session" do
subject do subject do
returning Object.new do |object| Object.new.tap {|object| object.extend Pickle::Session }
object.extend Pickle::Session
end
end end


it_should_behave_like "Pickle::Session proxy missing methods to parser" it_should_behave_like "Pickle::Session proxy missing methods to parser"
Expand All @@ -80,9 +78,7 @@ class Model


describe "(found from db)" do describe "(found from db)" do
let :user_from_db do let :user_from_db do
returning user.dup do |from_db| user.dup.tap {|from_db| from_db.stub!(:id).and_return(100) }
from_db.stub!(:id).and_return(100)
end
end end


before do before do
Expand Down

0 comments on commit 71ccd9b

Please sign in to comment.