Sha256: de5025dbbdfc4ca02c47755d1caa6edcf8768aa76aa51cc0a31b2c3d6ab8ddb2
Contents?: true
Size: 683 Bytes
Versions: 2
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true # Helpers for interacting with fixture data. module FixtureHelpers # Return path to fixture given a relative path. # # @param relative_path [String] relative path to fixture. # @return [String] path to fixture corresponding to relative_path. def fixtures_path(relative_path) File.join(File.dirname(__FILE__), '..', 'fixtures', relative_path) end # Return the binary contents of the given file. # # @param relative_path [String] relative path to fixture. # @return [String] binary data read from the fixture file. def fixtures_file(relative_path) Bitcoin::Protocol.read_binary_file(fixtures_path(relative_path)) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
bitcoin-ruby-0.0.20 | spec/helpers/fixture_helpers.rb |
bitcoin-ruby-0.0.19 | spec/helpers/fixture_helpers.rb |