Sha256: ec73c80ad794768ffdf440ed19ada5a6a0087ac96625f9cd5311371a6b4d0db2

Contents?: true

Size: 742 Bytes

Versions: 27

Compression:

Stored size: 742 Bytes

Contents

require 'spec_helper'

describe RestModel::Configuration do
  after(:all) do
    RestModel::Configuration.convert_input_keys = nil
  end

  context "when no custom input keys converter is set" do
    it "returns default key converter" do
      default_handler = RestModel::Configuration::DefaultHandler
      RestModel::Configuration.convert_input_keys.should == default_handler
    end
  end

  context "when a custom input keys converter is set" do
    let(:custom_convert_input_keys) {lambda {|keys| keys}}

    before {RestModel::Configuration.convert_input_keys = custom_convert_input_keys}

    it "returns custom key converter" do
      RestModel::Configuration.convert_input_keys.should == custom_convert_input_keys
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rest_model-0.2.1 spec/unit/configuration_spec.rb
rest_model-0.2.0 spec/unit/configuration_spec.rb
rest_model-0.1.24 spec/unit/configuration_spec.rb
rest_model-0.1.23 spec/unit/configuration_spec.rb
rest_model-0.1.22 spec/unit/configuration_spec.rb
rest_model-0.1.21 spec/unit/configuration_spec.rb
rest_model-0.1.20 spec/unit/configuration_spec.rb
rest_model-0.1.19 spec/unit/configuration_spec.rb
rest_model-0.1.18 spec/unit/configuration_spec.rb
rest_model-0.1.17 spec/unit/configuration_spec.rb
rest_model-0.1.16 spec/unit/configuration_spec.rb
rest_model-0.1.15 spec/unit/configuration_spec.rb
rest_model-0.1.14 spec/unit/configuration_spec.rb
rest_model-0.1.13 spec/unit/configuration_spec.rb
rest_model-0.1.12 spec/unit/configuration_spec.rb
rest_model-0.1.11 spec/unit/configuration_spec.rb
rest_model-0.1.10 spec/unit/configuration_spec.rb
rest_model-0.1.9 spec/unit/configuration_spec.rb
rest_model-0.1.8 spec/unit/configuration_spec.rb
rest_model-0.1.7 spec/unit/configuration_spec.rb