Sha256: 469553706b33f5b0b4a7e9019445036c1f130409fda93a222f5a7c73011d7ec4
Contents?: true
Size: 651 Bytes
Versions: 4
Compression:
Stored size: 651 Bytes
Contents
require "spec_helper" describe AttrExtras::Utils do describe ".flat_names" do subject { AttrExtras::Utils.flat_names(names) } it "strips any bangs from a flat list of arguments" do _(AttrExtras::Utils.flat_names([ :foo, :bar! ])).must_equal [ "foo", "bar" ] end it "flattens hash arguments and strips any bangs" do _(AttrExtras::Utils.flat_names([ :foo, [ :bar, :baz! ] ])).must_equal [ "foo", "bar", "baz" ] end it "flattens hash arguments with defaults and strips any bangs" do _(AttrExtras::Utils.flat_names([ :foo, [ bar: "Bar", baz!: "Baz"] ])).must_equal [ "foo", "bar", "baz" ] end end end
Version data entries
4 entries across 4 versions & 1 rubygems