Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add test to verify that stub block gets evaluated in the correct context

  • Loading branch information...
commit 1d6be5badb95753af17b74ed1acc4e4f1e7df912 1 parent a020793
Nikolai Weibull authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 test/unit/lookout/expect/object/context.rb
4 test/unit/lookout/expect/object/context.rb
View
@@ -9,6 +9,10 @@
Lookout::Expect::Object::Context.new{ stub(o, :a => 1){ |e| e } }.evaluate
end
+ expect Object.new do |o|
+ Lookout::Expect::Object::Context.new{ stub(o, :a => 1){ |e| stub(e, :b => 2){ |f| f } } }.evaluate
+ end
+
expect 1 do
Lookout::Expect::Object::Context.new{ stub(Object.new, :a => 1){ |o| o.a } }.evaluate
end
Please sign in to comment.
Something went wrong with that request. Please try again.