aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/load_file_fixtures.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-06-03 10:50:17 +0100
committerLouise Crow <louise.crow@gmail.com>2013-06-03 10:50:17 +0100
commit050b25bd70909913b7e42d53cb69c31b1396cc46 (patch)
treeac2f2b587ffa3504c5cf5164b36f5f436c0582f4 /spec/support/load_file_fixtures.rb
parent4db18138584b6394286bbe374f22e6609ab79136 (diff)
parente30a8623a1706d3bad4476198085547d8f47cc88 (diff)
Merge branch 'release/0.11' into wdtk
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