Sha256: 6e3f3cbec143563361c97500d89af821e396ad3c3b9c68b475c9872cdb8bb811

Contents?: true

Size: 607 Bytes

Versions: 2

Compression:

Stored size: 607 Bytes

Contents

# encoding: utf-8
#
require 'spec_helper'

describe Mocrata::Configuration do
  let :config do
    Mocrata::Configuration.new
  end

  describe '#per_page' do
    it 'has default value' do
      expect(config.per_page).to eq(1000)
    end
  end

  describe '#per_page=' do
    it 'overrides default value' do
      expect(config.per_page).to eq(1000)
      config.per_page = 50
      expect(config.per_page).to eq(50)
    end

    it 'raises exception if max value is exceeded' do
      expect { config.per_page = 1001 }.to raise_error(
        Mocrata::Configuration::ConfigurationError)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mocrata-0.1.0 spec/lib/mocrata/configuration_spec.rb
mocrata-0.0.1 spec/lib/mocrata/configuration_spec.rb