Sha256: 2ce22fb81e88740fd1daa80e1a4792c3837eff9a4cd250c9d7ec4d31c3ccd61e

Contents?: true

Size: 687 Bytes

Versions: 21

Compression:

Stored size: 687 Bytes

Contents

# frozen_string_literal: true

require "spec_helper"

describe Statesman::Config do
  let(:instance) { described_class.new }

  after { Statesman.configure { storage_adapter(Statesman::Adapters::Memory) } }

  describe "#storage_adapter" do
    subject { instance.adapter_class }

    let(:adapter) { Class.new }

    before { instance.storage_adapter(adapter) }

    it { is_expected.to be(adapter) }

    it "is DSL configurable" do
      new_adapter = adapter
      Statesman.configure { storage_adapter(new_adapter) }

      defined_adapter = nil
      Statesman.instance_eval { defined_adapter = @storage_adapter }
      expect(defined_adapter).to be(new_adapter)
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
statesman-11.0.0 spec/statesman/config_spec.rb
statesman-10.2.3 spec/statesman/config_spec.rb
statesman-10.2.2 spec/statesman/config_spec.rb
statesman-10.2.1 spec/statesman/config_spec.rb
statesman-10.2.0 spec/statesman/config_spec.rb
statesman-10.1.0 spec/statesman/config_spec.rb
statesman-10.0.0 spec/statesman/config_spec.rb
statesman-9.0.1 spec/statesman/config_spec.rb
statesman-9.0.0 spec/statesman/config_spec.rb
statesman-8.0.3 spec/statesman/config_spec.rb
statesman-8.0.2 spec/statesman/config_spec.rb
statesman-8.0.1 spec/statesman/config_spec.rb
statesman-8.0.0 spec/statesman/config_spec.rb
statesman-7.4.1 spec/statesman/config_spec.rb
statesman-7.4.0 spec/statesman/config_spec.rb
statesman-7.3.0 spec/statesman/config_spec.rb
statesman-7.2.0 spec/statesman/config_spec.rb
statesman-7.1.0 spec/statesman/config_spec.rb
statesman-7.0.1 spec/statesman/config_spec.rb
statesman-7.0.0 spec/statesman/config_spec.rb