Module: MetadataPresenter::TestHelpers
- Defined in:
- lib/metadata_presenter/test_helpers.rb
Instance Method Summary collapse
- #fixtures_directory ⇒ Object
- #metadata_fixture(fixture_name) ⇒ Object
- #service ⇒ Object
- #service_metadata ⇒ Object
Instance Method Details
#fixtures_directory ⇒ Object
7 8 9 10 |
# File 'lib/metadata_presenter/test_helpers.rb', line 7 def fixtures_directory @fixtures_directory ||= Pathname.new(MetadataPresenter::Engine.root.join('fixtures')) end |
#metadata_fixture(fixture_name) ⇒ Object
16 17 18 |
# File 'lib/metadata_presenter/test_helpers.rb', line 16 def (fixture_name) JSON.parse(File.read(fixtures_directory.join("#{fixture_name}.json"))) end |
#service ⇒ Object
3 4 5 |
# File 'lib/metadata_presenter/test_helpers.rb', line 3 def service MetadataPresenter::Service.new() end |
#service_metadata ⇒ Object
12 13 14 |
# File 'lib/metadata_presenter/test_helpers.rb', line 12 def (:version) end |