Sha256: 2823aa63d4e9695347223d5c0e9ff14a8ae9d6b0438f9f1033459ce11a7c98cd

Contents?: true

Size: 741 Bytes

Versions: 33

Compression:

Stored size: 741 Bytes

Contents

require 'spec_helper'

describe Maestrano::Connector::Rails::EntityBase do
  describe 'instance methods' do
    let!(:organization) { create(:organization, uid: 'cld-123') }
    let!(:connec_client) { Maestrano::Connec::Client[organization.tenant].new(organization.uid) }
    let!(:external_client) { Object.new }
    let(:opts) { {} }
    subject { Maestrano::Connector::Rails::EntityBase.new(organization, connec_client, external_client, opts) }

    describe 'opts_merge!' do
      let(:opts) { {a: 1, opts: 2} }

      it 'merges options with the instance variable' do
        subject.opts_merge!(opts: 3, test: 'test')
        expect(subject.instance_variable_get(:@opts)).to eql(a: 1, opts: 3, test: 'test')
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
maestrano-connector-rails-2.0.0.pre.RC2 spec/models/entity_base_spec.rb
maestrano-connector-rails-2.0.0.pre.RC1 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.4.0 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.3.5 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.3.4 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.3.3 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.3.2 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.3.1 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.3.0 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.2.3 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.2.2 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.2.1 spec/models/entity_base_spec.rb
maestrano-connector-rails-1.2.0 spec/models/entity_base_spec.rb