aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/load_file_fixtures.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-04 15:03:02 +0100
committerLouise Crow <louise.crow@gmail.com>2013-06-04 15:03:02 +0100
commita885764b65916020d9182073b38f6951a20d4b8c (patch)
tree0988651c144b65a8e46b28b376b2e72a5947d934 /spec/support/load_file_fixtures.rb
parenteb1c465162420ad62c16dccb983cb28aa89a4639 (diff)
parenta919141992a40599f99b32bd4a8312a0009f3f7a (diff)
Merge branch 'release/0.11'0.11.0.3
Diffstat (limited to 'spec/support/load_file_fixtures.rb')
-rw-r--r--spec/support/load_file_fixtures.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/load_file_fixtures.rb b/spec/support/load_file_fixtures.rb
new file mode 100644
index 000000000..a54505e99
--- /dev/null
+++ b/spec/support/load_file_fixtures.rb
@@ -0,0 +1,8 @@
+def file_fixture_name(file_name)
+ return File.join(RSpec.configuration.fixture_path, "files", file_name)
+end
+
+def load_file_fixture(file_name)
+ file_name = file_fixture_name(file_name)
+ return File.open(file_name, 'rb') { |f| f.read }
+end