Merge pull request #1951 from thoughtbot/bb-erb

Use ERB to pull conf files into app
This commit is contained in:
Sam
2014-02-18 16:23:55 +11:00
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