Sha256: 3d169a1bfffd56abc6bb41d85d132f4f6b43afb681af17846480e58a0048d408

Contents?: true

Size: 440 Bytes

Versions: 4

Compression:

Stored size: 440 Bytes

Contents

# encoding: utf-8

describe Assertion::Inflector, "#to_snake" do

  subject { fn[input] }

  let(:fn)     { described_class[:to_snake] }
  let(:input)  { "FooBarBAz___qux" }
  let(:output) { "foo_bar_baz_qux" }

  it "doesn't mutate the input" do
    expect { subject }.not_to change { input }
  end

  it "returns the string converted to snake case" do
    expect(subject).to eql output
  end

end # describe Assertion::Inflector#to_snake

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
assertion-0.2.1 spec/unit/assertion/inflector/to_snake_spec.rb
assertion-0.2.0 spec/unit/assertion/inflector/to_snake_spec.rb
assertion-0.1.0 spec/unit/assertion/transprocs/inflector/to_snake_spec.rb
assertion-0.0.1 spec/unit/assertion/transprocs/inflector/to_snake_spec.rb