Sha256: 4276999bd34525c8c2f6bfbcb4a4c6feacbb7f5216efee65f2f7de83c52b9120

Contents?: true

Size: 740 Bytes

Versions: 14

Compression:

Stored size: 740 Bytes

Contents

require 'spec_helper'

RSpec.describe JWTKeeper do
  describe '#configure' do
    let(:new_config) { { secret: '#configure-secret' } }

    context 'without block' do
      before do
        described_class.configure(JWTKeeper::Configuration.new(new_config))
      end

      it 'sets the configuration based on param' do
        expect(described_class.configuration.secret).to eql new_config[:secret]
      end
    end

    context 'with block' do
      before do
        described_class.configure do |config|
          config.secret = new_config[:secret]
        end
      end

      it 'sets configuration based on the block' do
        expect(described_class.configuration.secret).to eql new_config[:secret]
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
jwt_keeper-6.1.3 spec/lib/jwt_keeper_spec.rb
jwt_keeper-6.1.2 spec/lib/jwt_keeper_spec.rb
jwt_keeper-6.1.1 spec/lib/jwt_keeper_spec.rb
jwt_keeper-6.1.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-6.0.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-5.0.1 spec/lib/jwt_keeper_spec.rb
jwt_keeper-5.0.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-4.0.1 spec/lib/jwt_keeper_spec.rb
jwt_keeper-4.0.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-3.3.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-3.2.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-3.1.0 spec/lib/jwt_keeper_spec.rb
jwt_keeper-3.0.1 spec/lib/jwt_keeper_spec.rb
jwt_keeper-3.0.0 spec/lib/jwt_keeper_spec.rb