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.6.7 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.6 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.5 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.4 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.3 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.2 spec/restpack_serializer_spec.rb
restpack_serializer-0.6.1 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.10 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.9 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.8 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.7 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.6 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.5 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.4 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.3 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.2 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.1 spec/restpack_serializer_spec.rb
restpack_serializer-0.5.0 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.28 spec/restpack_serializer_spec.rb
restpack_serializer-0.4.27 spec/restpack_serializer_spec.rb