Sha256: 57a1edc61bc66c06e0d4a291ddbf4b8a0cd1295598a1e5ee39f4f39e229a3931

Contents?: true

Size: 559 Bytes

Versions: 53

Compression:

Stored size: 559 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
      subject.config.href_prefix.should == ''
      subject.config.page_size.should == 10
    end

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

      subject.config.href_prefix.should == '/api/v1'
      subject.config.page_size.should == 50
    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
restpack_serializer-0.4.26 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.25 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.24 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.23 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.21 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.20 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.19 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.18 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.17 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.16 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.15 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.14 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.13 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.12 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.11 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.10 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.9 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.8 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.7 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.6 spec/restpack_serializer_spec.rb