Use ERB when importing conf files into app

This commit is contained in:
Britt Ballard
2014-02-14 13:35:30 -08:00
parent 9c4dc9a966
commit 60e1a5aa69
3 changed files with 14 additions and 1 deletions

View File

@ -31,4 +31,16 @@ describe GlobalSetting::FileProvider do
f.unlink
end
it "uses ERB" do
f = Tempfile.new('foo')
f.write("a = <%= 500 %> # this is a comment\n")
f.close
provider = GlobalSetting::FileProvider.from(f.path)
provider.lookup(:a,"").should == 500
f.unlink
end
end