Sha256: 5977000facde9544155543e9d1b57520926dd4e19ea72c42bcac5fdff175fc30

Contents?: true

Size: 453 Bytes

Versions: 2

Compression:

Stored size: 453 Bytes

Contents

require File.dirname(__FILE__) + '/base'

describe YamlDb::Utils, " convert records utility method" do

	it "turns an array with one record into a yaml chunk" do
		YamlDb::Utils.chunk_records([ %w(a b) ]).should == <<EOYAML
  - - a
    - b
EOYAML
	end

	it "turns an array with two records into a yaml chunk" do
		YamlDb::Utils.chunk_records([ %w(a b), %w(x y) ]).should == <<EOYAML
  - - a
    - b
  - - x
    - y
EOYAML
	end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yaml_db_improved-1.0.1 spec/yaml_utils_spec.rb
yaml_db_improved-1.0.0 spec/yaml_utils_spec.rb