Sha256: 9061ef26c66cc8c83837a4405f264bc57c36cff4dc1ba50352bb82946671b9b4

Contents?: true

Size: 579 Bytes

Versions: 8

Compression:

Stored size: 579 Bytes

Contents

require 'spec_helper'

describe RestPack::Serializer do
  before { @original_config = subject.config.clone }
  after { subject.config = @original_config }

  context "#setup" do
    it "has defaults" do
      expect(subject.config.href_prefix).to eq('')
      expect(subject.config.page_size).to eq(10)
    end

    it "can be configured" do
      subject.setup do |config|
        config.href_prefix = '/api/v1'
        config.page_size = 50
      end

      expect(subject.config.href_prefix).to eq('/api/v1')
      expect(subject.config.page_size).to eq(50)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
restpack_serializer-0.6.15 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.14 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.13 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.12 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.11 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.10 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.9 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.8 spec/restpack_serializer_spec.rb