Sha256: d54fa339d5e8267595b3ca0c0037f54075d441fedd90a960bfdd18350c2fb9a3
Contents?: true
Size: 641 Bytes
Versions: 1
Compression:
Stored size: 641 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Hashmake::HashedArg do it 'should raise ArgumentError if :reqd is false and no :default value is given' do hash = { :reqd => false, :key => :some_variable, :type => String } lambda { Hashmake::HashedArg.new hash }.should raise_error(ArgumentError) end it 'should not raise ArgumentError if :reqd is false and a :default value is given' do hash = { :reqd => false, :key => :some_variable, :type => String, :default => "" } lambda { Hashmake::HashedArg.new hash }.should_not raise_error(ArgumentError) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
hashmake-0.1.0 | spec/hashed_arg_spec.rb |