spec/lib/taketo/support/eval_delegator_spec.rb in taketo-0.0.2 vs spec/lib/taketo/support/eval_delegator_spec.rb in taketo-0.0.3
- old
+ new
@@ -24,10 +24,16 @@
expect do
EvalDelegatorContext.new.evaluate { bar }
end.not_to raise_error
end
- it "should pass local variables through the scopes" do
+ it "should raise if external context does not respond" do
+ expect do
+ EvalDelegatorContext.new.evaluate { qux }
+ end.to raise_error(NameError)
+ end
+
+ it "should pass local variabnes through the scopes" do
baz = :foo
expect do
EvalDelegatorContext.new.evaluate { baz }
end.not_to raise_error
end