aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/fixtures_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/fixtures_helper.rb')
-rw-r--r--spec/support/fixtures_helper.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/support/fixtures_helper.rb b/spec/support/fixtures_helper.rb
new file mode 100644
index 000000000..20963261b
--- /dev/null
+++ b/spec/support/fixtures_helper.rb
@@ -0,0 +1,18 @@
+module Support
+ module FixturesHelper
+ def fixtures_path *segments
+ Rails.root.join( fixture_path, *segments )
+ end
+
+ def open_fixture *segments
+ File.open(fixtures_path(*segments))
+ end
+ def read_fixture *segments
+ File.read(fixtures_path(*segments))
+ end
+ end
+end
+
+RSpec.configure do |c|
+ c.include Support::FixturesHelper
+end