Sha256: 043262994c3bbf25f3a85f188ff8f14391e5bb2b15e8ac29fb091dc71c12c76d

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

require "spec_helper"

module Fonte
  module Parsers
    describe PropertyParser do
      let(:parser) { described_class.new }

      subject { parser.parse(properties) }

      context "with one property" do
        let(:properties) { '(key "value")' }
        it { should be }
        its(:value) { should == { "key" => "value" } }
      end

      context "with multiple properties" do
        let(:properties) { '(key1 "value1") (key2 "value2")' }
        it { should be }
        its(:value) { should == { "key1" => "value1", "key2" => "value2" } }
      end

      context "with properties without values" do
        let(:properties) { '(headshot)' }
        it { should be }
        its(:value) { should == { "headshot" => true } }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fonte-0.1.0 spec/parsers/property_parser_spec.rb