Module: ErgomentumRspec::Helpers::Fixture
- Defined in:
- lib/ergomentum_rspec/helpers/fixture.rb
Instance Method Summary collapse
- #fixture(relative_path) ⇒ Object
- #fixtures_directory ⇒ Object
- #load_fixture(relative_path) ⇒ Object
- #spec_directory ⇒ Object
Instance Method Details
#fixture(relative_path) ⇒ Object
10 11 12 |
# File 'lib/ergomentum_rspec/helpers/fixture.rb', line 10 def fixture(relative_path) fixtures_directory / relative_path end |
#fixtures_directory ⇒ Object
14 15 16 |
# File 'lib/ergomentum_rspec/helpers/fixture.rb', line 14 def fixtures_directory spec_directory / "fixtures" end |
#load_fixture(relative_path) ⇒ Object
6 7 8 |
# File 'lib/ergomentum_rspec/helpers/fixture.rb', line 6 def load_fixture(relative_path) File.read(fixture(relative_path)) end |
#spec_directory ⇒ Object
18 19 20 |
# File 'lib/ergomentum_rspec/helpers/fixture.rb', line 18 def spec_directory Pathname.getwd / "spec" end |