Class: BBCDataService::FixtureLoader

Inherits:
Object
  • Object
show all
Defined in:
lib/bbc_data_service/fixture_loader.rb

Class Method Summary collapse

Class Method Details

.load_fixture(name, options = {}) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/bbc_data_service/fixture_loader.rb', line 3

def self.load_fixture(name, options = {})
  require ServiceConfig[:fixture_config].to_s
  app_fixture = AppFixture.fixtures[name]
  app_fixture = self.merge_fixtures(app_fixture) if app_fixture[:parent]
  if app_fixture
    self.parse_data(app_fixture, options)
  end
end