./test/dolt/template_renderer_test.rb in dolt-0.1.0 vs ./test/dolt/template_renderer_test.rb in dolt-0.1.1
- old
+ new
@@ -75,6 +75,14 @@
renderer.helper(ViewHelper)
File.stubs(:read).with("/file.erb").returns("Say it: <%= say_it %>")
assert_equal "Say it: YES", renderer.render(:file)
end
+
+ it "configures the renderer" do
+ renderer = Dolt::TemplateRenderer.new("/", { :attributes => { :stuff => "THING" } })
+ renderer.helper(ViewHelper)
+ File.stubs(:read).with("/file.erb").returns("<%= stuff %>")
+
+ assert_equal "THING", renderer.render(:file)
+ end
end