Sha256: f408465dc08d1c4e058b16ae3be2668d1e9c63f3d11e6c75151e6f5a7eb65992
Contents?: true
Size: 825 Bytes
Versions: 1
Compression:
Stored size: 825 Bytes
Contents
describe CLIForge::Configuration, "#register_argument_filter" do it "should register the filter" do subject.register_argument_filter(:hi) { "hi" } expect(subject.argument_filters.size).to eq(1) expect(subject.argument_filters[0].call).to eq("hi") end it "should allow you to register over existing commands" do subject.register_argument_filter(:hi) { "hi" } subject.register_argument_filter(:hi) { "bye" } expect(subject.argument_filters.size).to eq(1) expect(subject.argument_filters[0].call).to eq("bye") end it "should coerce string names to symbols" do subject.register_argument_filter("hi") { "hi" } subject.register_argument_filter(:hi) { "bye" } expect(subject.argument_filters.size).to eq(1) expect(subject.argument_filters[0].call).to eq("bye") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cli-forge-0.1.0 | spec/unit/cli_forge/configuration/register_argument_filter_spec.rb |