Sha256: acc622b33a70a834be6ebf4fb352366ef80583896e73f10c78ad7d608be9d173

Contents?: true

Size: 431 Bytes

Versions: 29

Compression:

Stored size: 431 Bytes

Contents

require "spec_helper"

describe Lita::Util do
  describe ".stringify_keys" do
    it "converts symbol hash keys to strings" do
      stringified = described_class.stringify_keys(foo: "bar")
      expect(stringified).to eq("foo" => "bar")
    end
  end

  describe ".underscore" do
    it "converts camel cased strings into snake case" do
      expect(described_class.underscore("FooBarBaz")).to eq("foo_bar_baz")
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
lita-4.8.0 spec/lita/util_spec.rb
lita-4.8.0.beta1 spec/lita/util_spec.rb
lita-4.7.1 spec/lita/util_spec.rb
lita-4.7.0 spec/lita/util_spec.rb
lita-4.6.1 spec/lita/util_spec.rb
lita-4.6.0 spec/lita/util_spec.rb
lita-4.5.0 spec/lita/util_spec.rb
lita-4.4.3 spec/lita/util_spec.rb
lita-4.4.2 spec/lita/util_spec.rb
lita-4.4.1 spec/lita/util_spec.rb
lita-4.4.0 spec/lita/util_spec.rb
lita-4.3.2 spec/lita/util_spec.rb
lita-4.3.1 spec/lita/util_spec.rb
lita-4.3.0 spec/lita/util_spec.rb
lita-4.2.1 spec/lita/util_spec.rb
lita-4.2.0 spec/lita/util_spec.rb
lita-4.1.0 spec/lita/util_spec.rb
lita-4.0.4 spec/lita/util_spec.rb
lita-4.0.3 spec/lita/util_spec.rb
lita-4.0.2 spec/lita/util_spec.rb