Sha256: 1871c3d34c8b3e4635a9c52908169d0d4ae8020d272ee5a45c7104f1ef0dce27

Contents?: true

Size: 479 Bytes

Versions: 17

Compression:

Stored size: 479 Bytes

Contents

require 'rails_helper'

describe LHS::Record do

  context 'options' do
    before do
      class Record < LHS::Record
        endpoint 'http://local.ch/records'
      end
    end

    let(:raw) do
      { options: { criticality: :high } }
    end

    def record
      LHS::Record.new LHS::Data.new(raw, nil, Record)
    end

    it 'is possible to fetch data from a key called options from an instance' do
      expect(record.options.criticality).to eq :high
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
lhs-16.1.5 spec/record/options_getter_spec.rb
lhs-16.1.4 spec/record/options_getter_spec.rb
lhs-16.1.3 spec/record/options_getter_spec.rb
lhs-16.1.2 spec/record/options_getter_spec.rb
lhs-16.1.1 spec/record/options_getter_spec.rb
lhs-16.1.0 spec/record/options_getter_spec.rb
lhs-16.0.1 spec/record/options_getter_spec.rb
lhs-16.0.0 spec/record/options_getter_spec.rb
lhs-15.7.0 spec/record/options_getter_spec.rb
lhs-15.6.1 spec/record/options_getter_spec.rb
lhs-15.6.0 spec/record/options_getter_spec.rb
lhs-15.5.1 spec/record/options_getter_spec.rb
lhs-15.5.0 spec/record/options_getter_spec.rb
lhs-15.4.1 spec/record/options_getter_spec.rb
lhs-15.4.0 spec/record/options_getter_spec.rb
lhs-15.4.0.pre.hasone.1 spec/record/options_getter_spec.rb
lhs-15.3.3 spec/record/options_getter_spec.rb