Method: ShopifyAPI::Mock::Fixture#initialize

Defined in:
lib/shopify-mock/fixture.rb

#initialize(file_name) ⇒ Fixture

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

creates a new instance of ShopifyAPI::Mock::Fixture

Parameters:

  • file_name (String)

    The location of the file to load into the fixture

Raises:

  • (IOError)

    Raised when file_name is invalid



13
14
15
16
# File 'lib/shopify-mock/fixture.rb', line 13

def initialize(file_name)
  raise IOError, "File not found: #{file_name}" unless File.exists? file_name
  @file_name = file_name
end