Sha256: 67589dfe21bbcdd32aef17465d797a794851ae622e4901aac7c2767770482db3
Contents?: true
Size: 564 Bytes
Versions: 28
Compression:
Stored size: 564 Bytes
Contents
require "spec_helper" require "foreman/helpers" describe "Foreman::Helpers" do before do module Foo class Bar; end end end after do Object.send(:remove_const, :Foo) end subject { o = Object.new; o.extend(Foreman::Helpers); o } it "should classify words" do expect(subject.classify("foo")).to eq("Foo") expect(subject.classify("foo-bar")).to eq("FooBar") end it "should constantize words" do expect(subject.constantize("Object")).to eq(Object) expect(subject.constantize("Foo::Bar")).to eq(Foo::Bar) end end
Version data entries
28 entries across 28 versions & 4 rubygems