Sha256: 471477d8a53601ebc3189de8cfa9bab228fe233999dbd6ca6894449b154a2494
Contents?: true
Size: 398 Bytes
Versions: 3
Compression:
Stored size: 398 Bytes
Contents
require 'pathname' # Returns pathname of the given fixture or folder in fixtures # def fixture_path(*name) Pathname.pwd.join('spec', 'fixtures', *name) end # Reads and returns fixture contents as a String. # def fixture(name) File.read(fixture_path(name)) end # Reads and returns fixture contents parsed from a JSON string. # def fixture_json(name) JSON.parse(fixture("#{name}.json")) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mimi-0.1.4 | lib/mimi/cli/template/spec/support/fixtures.rb |
mimi-0.1.3 | lib/mimi/cli/template/spec/support/fixtures.rb |
mimi-0.1.1 | lib/mimi/cli/template/spec/support/fixtures.rb |