spec/parsers/property_parser_spec.rb in fonte-0.1.0 vs spec/parsers/property_parser_spec.rb in fonte-0.2.0

- old
+ new

@@ -22,8 +22,28 @@ context "with properties without values" do let(:properties) { '(headshot)' } it { should be } its(:value) { should == { "headshot" => true } } end + + context "player property" do + let(:properties) { '(player "Reu<2><STEAM_1:1:24968171><Red>")' } + it { should be } + + describe "player" do + subject { parser.parse(properties).value["player"] } + it_should_behave_like "a real player" + end + end + + context "number property" do + let(:properties) { '(area "10")' } + its(:value) { should == { "area" => 10 } } + end + + context "coordinate property" do + let(:properties) { '(attacker_position "-1624 1258 617")' } + its(:value) { should == { "attacker_position" => [-1624, 1258, 617] } } + end end end end