Sha256: c2e86b9d654eb7f6e6f4955ed12e2a609b0a3027634807830e84053dcd771cee
Contents?: true
Size: 690 Bytes
Versions: 8
Compression:
Stored size: 690 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' module Cucumber module Model describe Table do before do @raw = [ %w{name gender}, %w{aslak male}, %w{patty female}, ] end it "should convert into hash-array" do ha = Table.new(@raw).hashes ha.should == [ {'name' => 'aslak', 'gender' => 'male'}, {'name' => 'patty', 'gender' => 'female'} ] end it "should return the rows of the table" do ar = Table.new(@raw).rows ar.should == [ ["aslak", "male"], ["patty", "female"] ] end end end end
Version data entries
8 entries across 8 versions & 3 rubygems