Sha256: 3c7a144dca86d145bbba88bac7857beb8b9f282a47d81078663f74a09710d9d3

Contents?: true

Size: 737 Bytes

Versions: 25

Compression:

Stored size: 737 Bytes

Contents

require 'spec_helper'

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

  context "when no custom input keys converter is set" do
    it "returns default key converter" do
      default_handler = Transcriber::Configuration::DefaultHandler
      Transcriber.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 {Transcriber.configuration.convert_input_keys = custom_convert_input_keys}

    it "returns custom key converter" do
      Transcriber.configuration.convert_input_keys.should == custom_convert_input_keys
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
transcriber-0.0.26 spec/unit/configuration_spec.rb
transcriber-0.0.25 spec/unit/configuration_spec.rb
transcriber-0.0.24 spec/unit/configuration_spec.rb
transcriber-0.0.23 spec/unit/configuration_spec.rb
transcriber-0.0.22 spec/unit/configuration_spec.rb
transcriber-0.0.21 spec/unit/configuration_spec.rb
transcriber-0.0.20 spec/unit/configuration_spec.rb
transcriber-0.0.19 spec/unit/configuration_spec.rb
transcriber-0.0.18 spec/unit/configuration_spec.rb
transcriber-0.0.17 spec/unit/configuration_spec.rb
transcriber-0.0.16 spec/unit/configuration_spec.rb
transcriber-0.0.15 spec/unit/configuration_spec.rb
transcriber-0.0.14 spec/unit/configuration_spec.rb
transcriber-0.0.13 spec/unit/configuration_spec.rb
transcriber-0.0.12 spec/unit/configuration_spec.rb
transcriber-0.0.11 spec/unit/configuration_spec.rb
transcriber-0.0.10 spec/unit/configuration_spec.rb
transcriber-0.0.9 spec/unit/configuration_spec.rb
transcriber-0.0.8 spec/unit/configuration_spec.rb
transcriber-0.0.7 spec/unit/configuration_spec.rb