Sha256: 0c89170e56df807b3fba544eb06950518a91818dfc5bfc3bb01ad014f338a044

Contents?: true

Size: 732 Bytes

Versions: 5

Compression:

Stored size: 732 Bytes

Contents

require 'spec_helper'

describe Cellular do

  describe '::config' do
    it 'creates a new configuration if none exists' do
      described_class.config = nil
      expect(described_class.config).to be_a described_class::Configuration
    end

    it 'retrieves any existing configuration' do
      config = described_class::Configuration.new
      described_class.config = config
      expect(described_class.config).to eq config
    end
  end

  describe '::configure' do
    it 'sets configuration options correctly' do
      described_class.config = nil
      described_class.configure do |config|
        config.username = 'username'
      end
      expect(described_class.config.username).to eq 'username'
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cellular-2.1.0 spec/cellular_spec.rb
cellular-2.0.0 spec/cellular_spec.rb
cellular-1.3.0 spec/cellular_spec.rb
cellular-1.2.0 spec/cellular_spec.rb
cellular-1.1.0 spec/cellular_spec.rb