Sha256: 6a8a5185967245ded90dd11cd1f5ab415d9b709b8f8787e7e398ca85b67a4110
Contents?: true
Size: 439 Bytes
Versions: 14
Compression:
Stored size: 439 Bytes
Contents
describe 'array options' do describe "extract_options!" do it "should extract an options hash from an array" do [1, 2, :a => :b].extract_options!.should == { :a => :b } end it "should return an empty hash if the last element is not a hash" do [1, 2].extract_options!.should == {} end it "should return an empty hash on an empty array" do [].extract_options!.should == {} end end end
Version data entries
14 entries across 14 versions & 2 rubygems