Sha256: 8a888bd40d07dcf5a8cb31676230eae1b5c28b4b16d6dd5e5b7a99e773b2c43a

Contents?: true

Size: 560 Bytes

Versions: 3

Compression:

Stored size: 560 Bytes

Contents

require 'spec_helper'
module Alf
  describe Shell, ".from_argv(argv, AttrName)" do

    subject{ Shell.from_argv(argv, AttrName) }

    context "with a String" do
      let(:argv){ %w{hello} }
      it{ should eq(:hello) }
    end

    context "with nothing" do
      let(:argv){ %w{} }
      specify{
        lambda{ subject }.should raise_error(Myrrha::Error)
      }
    end

    context "with more than one string" do
      let(:argv){ %w{hello world} }
      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_name.rb
alf-shell-0.13.1 spec/unit/from_argv/test_to_attr_name.rb
alf-shell-0.13.0 spec/unit/from_argv/test_to_attr_name.rb