spec/build/environment/evaluator_spec.rb in build-environment-1.5.0 vs spec/build/environment/evaluator_spec.rb in build-environment-1.6.0

- old
+ new

@@ -35,6 +35,18 @@ dinner :fruit end expect(environment.flatten.evaluator.dinner).to be == "apples" end + + it "caches results" do + environment = Build::Environment.new do + index = 0 + size {index += 1} + end + + evaluator = environment.flatten.evaluator + + expect(evaluator.size).to be == 1 + expect(evaluator.size).to be == 1 + end end