spec/lib/onebox/engine_spec.rb in onebox-1.0.0 vs spec/lib/onebox/engine_spec.rb in onebox-1.0.1
- old
+ new
@@ -49,9 +49,19 @@
result = OneboxEngineBar.new("http://example.com", cache).send(:record)
expect(result).to eq("new content")
end
end
+ describe "#template_path" do
+ it "returns file path for onebox template" do
+ class OneboxEngineVoo
+ include Onebox::Engine
+ end
+ result = OneboxEngineVoo.new("http://amazon.com").send(:template_path)
+ expect(result).to eq("/home/jzeta/Projects/rgsoc/onebox/templates/enginevoo.handlebars")
+ end
+ end
+
describe ".===" do
it "returns true if argument matches the matcher" do
class OneboxEngineFoo
include Onebox::Engine
@@matcher = /example/