Sha256: b6056b04de530ac2bde8406c2c11b6bb3eb38b6ff40280d457acaa121cf28d53
Contents?: true
Size: 918 Bytes
Versions: 14
Compression:
Stored size: 918 Bytes
Contents
require 'spec_helper' require 'sugar-high/arguments' describe "SugarHigh" do describe "Arguments" do context 'Symbol' do it "should return arg list with 'hello'" do :hello.args.should == ['hello'] end end context 'String' do it "should return arg list with 'hello'" do :hello.args.should == ['hello'] end end context 'Array' do it "should return arg list with 'hello', 'you'" do [:hello, ['you']].args.should == ['hello', 'you'] end end describe "Last option" do context 'Last arg is Hash' do it "should return the last hash" do last_option(3,4, :x => 3, :y => 5).should == {:x => 3, :y => 5} end end context 'Last arg is NOT Hash' do it "should return an empty hash" do last_option(3,4,3).should == {} end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems