Sha256: 59704cd2e1688bd0fd3c03e6192cdebaae85c4b23cabbcccca381fe4e4ad088a

Contents?: true

Size: 461 Bytes

Versions: 4

Compression:

Stored size: 461 Bytes

Contents

# encoding: utf-8

describe Assertion::Inflector, "#to_snake_path" do

  subject { fn[input] }

  let(:fn)     { described_class[:to_snake_path] }
  let(:input)  { "::Foo::BarBAZ::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_path

Version data entries

4 entries across 4 versions & 1 rubygems

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