Sha256: 9bd1b5c771f8c6cdb2dc3dff7080ffd122ba22cb9157629a23f27ff496df9d06
Contents?: true
Size: 687 Bytes
Versions: 3
Compression:
Stored size: 687 Bytes
Contents
require 'spec_helper' module Alf describe Shell, ".from_argv(argv, AttrList)" do subject{ Shell.from_argv(argv, AttrList) } context "on an empty array" do let(:argv){ [] } it{ should eq(AttrList.new([])) } end context "on a singleton" do let(:argv){ ["hello"] } it{ should eq(AttrList.new([:hello])) } end context "on multiple strings" do let(:argv){ ["hello", "world"] } it{ should eq(AttrList.new([:hello, :world])) } end context "when passed an unrecognized argument" do let(:argv){ :not_recognized } specify{ lambda{ subject }.should raise_error(Myrrha::Error) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
alf-shell-0.14.0 | spec/unit/from_argv/test_to_attr_list.rb |
alf-shell-0.13.1 | spec/unit/from_argv/test_to_attr_list.rb |
alf-shell-0.13.0 | spec/unit/from_argv/test_to_attr_list.rb |