Sha256: 806e2f4df0c33ec0474c6ce067a1befff2ebe7d8989352cfe0795c0d5b45e8dd

Contents?: true

Size: 567 Bytes

Versions: 11

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module Shark
  module RSpec
    module Helpers
      module Fixtures
        def form_structure_json
          load_json_fixture('form_structure.json')
        end

        def form_inputs_json
          load_json_fixture('form_inputs.json')
        end

        def load_json_fixture(filename)
          JSON.parse(load_fixture(filename))
        end

        def load_fixture(filename)
          filepath = File.expand_path("../../fixtures/#{filename}", __FILE__)
          File.read(filepath)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bima-shark-sdk-3.1.1 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.5.0 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-3.1.0 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-3.0.0 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.4.4 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.4.3 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.4.2 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.4.1 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.4.0 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.3.1 lib/shark/rspec/helpers/fixtures.rb
bima-shark-sdk-2.3.0 lib/shark/rspec/helpers/fixtures.rb