Sha256: 2ae262d66ab308b8551077ed1b6eaf46a7aaca66430de8b76d1ae9861ac3d448

Contents?: true

Size: 544 Bytes

Versions: 3

Compression:

Stored size: 544 Bytes

Contents

require 'spec_helper'

require 'cloud_shaped/camelate'

describe String, "#camelate" do
  it "is a no-op" do
    expect("foobar".camelate).to eq("foobar")
  end
end

describe Symbol, "#camelate" do
  it "returns a CamelCased string" do
    expect(:foo_bar.camelate).to eq("FooBar")
  end
end

describe Hash, "#camelate_keys" do

  it "camelates the keys" do
    original_hash = {
      :foo_bar => 123,
      "BlahBlah" => 456
    }
    expect(original_hash.camelate_keys).to eq(
      "FooBar" => 123,
      "BlahBlah" => 456
    )
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cloud_shaped-1.0.0 spec/cloud_shaped/camelate_spec.rb
cloud_shaped-0.1.3 spec/cloud_shaped/camelate_spec.rb
cloud_shaped-0.1.2 spec/cloud_shaped/camelate_spec.rb