Sha256: 59c302c745d798201d4c8551315447e0a9ae43ae48aba4bff555c4d0fbc482c9
Contents?: true
Size: 507 Bytes
Versions: 3
Compression:
Stored size: 507 Bytes
Contents
module ElabsMatchers module Helpers module Fixtures ## # # Opens a file from the fixtures directory. # # @param [String] file name A file name, relative to the fixtures folder. # # Example: # fixture_file("file.txt") # def fixture_file(path) root = if defined?(Rails) then Rails.root else "../../../spec/" end File.open(File.expand_path("#{root}/fixtures/#{path}", File.dirname(__FILE__))) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
elabs_matchers-0.0.3 | lib/elabs_matchers/helpers/fixtures.rb |
elabs_matchers-0.0.2 | lib/elabs_matchers/helpers/fixtures.rb |
elabs_matchers-0.0.1 | lib/elabs_matchers/helpers/fixtures.rb |