Module: Thingfish::SpecHelpers
- Includes:
- Constants
- Defined in:
- lib/thingfish/spechelpers.rb
Overview
RSpec helper functions.
Defined Under Namespace
Modules: Constants
Constant Summary collapse
- FIXTURE_DIR =
Load fixture data from the ThingFish spec data directory
Pathname( __FILE__ ).dirname.parent.parent + 'spec/data'
Constants included from Constants
Constants::TEST_APPID, Constants::TEST_METADATA, Constants::TEST_PNG_DATA, Constants::TEST_PNG_DATA_IO, Constants::TEST_RECV_SPEC, Constants::TEST_SEND_SPEC, Constants::TEST_TEXT_DATA, Constants::TEST_TEXT_DATA_IO, Constants::TEST_UUID, Constants::UUID_PATTERN
Instance Method Summary collapse
-
#fixture_data(filename) ⇒ Object
Load and return the data from the fixture with the specified
filename
.
Instance Method Details
#fixture_data(filename) ⇒ Object
Load and return the data from the fixture with the specified filename
.
158 159 160 161 |
# File 'lib/thingfish/spechelpers.rb', line 158 def fixture_data( filename ) fixture = FIXTURE_DIR + filename return fixture.open( 'r', encoding: 'binary' ) end |