refactor resource_file

This commit is contained in:
David Dollar
2012-01-29 10:03:14 -05:00
parent 083efe3ae9
commit 5fc7552572
+5 -1
View File
@@ -68,9 +68,13 @@ def load_export_templates_into_fakefs(type)
end end
end end
def resource_path(filename)
File.expand_path("../resources/#{filename}", __FILE__)
end
def example_export_file(filename) def example_export_file(filename)
FakeFS.deactivate! FakeFS.deactivate!
data = File.read(File.expand_path("../resources/export/#{filename}", __FILE__)) data = File.read(File.expand_path(resource_path("export/#{filename}"), __FILE__))
FakeFS.activate! FakeFS.activate!
data data
end end