Module: MetadataPresenter::TestHelpers

Defined in:
lib/metadata_presenter/test_helpers.rb

Instance Method Summary collapse

Instance Method Details

#fixtures_directoryObject



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

#serviceObject



3
4
5
# File 'lib/metadata_presenter/test_helpers.rb', line 3

def service
  MetadataPresenter::Service.new()
end

#service_metadataObject



12
13
14
# File 'lib/metadata_presenter/test_helpers.rb', line 12

def 
  (:version)
end