Sha256: 3856cd5b5f8da4ceac15e73be2699077ca5f941b437e14e5eb05bdde4cf4f483
Contents?: true
Size: 975 Bytes
Versions: 2
Compression:
Stored size: 975 Bytes
Contents
require 'helper' describe ProperProperties::Parsing::Parser do subject { ProperProperties::Parsing::Parser } let(:as_hash) do { :item0 => "", :item1 => "item1 ", :item2 => "item2 ", :item3 => "item3", :"it em4" => "item4", :"it=em5" => "item5", :item6 => "item6", :item7 => "line 1 line 2 line 3", :item8 => "line 1 #Not a Comment line 2 line 3", :item9 => "line 1 line 2 line 3", :item10 => "test\n\ttestP test\n\ttest test\n\ttest = test", :item11 => "line 1 \\line 2 \\\\line 3 line 4", :item12 => "line 1\\", :item13 => "line 1" } end it "parses correctly a properties file content" do content = fixture("test.properties") properties = subject.parse(content) # don't compare the hashes directly, as this hard to debug properties.keys.must_equal as_hash.keys properties.each do |key, value| value.must_equal as_hash[key] end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
proper_properties-0.0.2 | spec/proper_properties/parsing/parser_spec.rb |
proper_properties-0.0.1 | spec/proper_properties/parsing/parser_spec.rb |