spec/parsers/player_parser_spec.rb in fonte-0.1.0 vs spec/parsers/player_parser_spec.rb in fonte-0.2.0
- old
+ new
@@ -2,39 +2,19 @@
module Fonte
module Parsers
describe PlayerParser do
let(:parser) { described_class.new }
- let(:player) { "Reu<2><STEAM_1:1:24968171><Red>" }
-
subject { parser.parse(player) }
- its(:value) { should == "Reu<2><STEAM_1:1:24968171><Red>" }
-
- its(:"nickname.value") { should == "Reu" }
- its(:"uid.value") { should == 2 }
- its(:"steam_id.value") { should == "STEAM_1:1:24968171" }
- its(:"team.value") { should == "Red" }
-
- context "when the player is a bot" do
- let(:player) { "Nick<42><Bot><Red>" }
- its(:"steam_id.value") { should be_nil }
+ context "when the player is a default source player" do
+ let(:player) { "Reu<2><STEAM_1:1:24968171><Red>" }
+ it { should be }
end
- context "when the player is the console" do
- let(:player) { "Console<0><Console><Console>" }
- its(:"steam_id.value") { should be_nil }
- its(:"team.value") { should be_nil }
- end
-
- context "when the team is not present" do
- let(:player) { "Reu<2><STEAM_1:1:24968171><>" }
- its(:"team.value") { should be_nil }
- end
-
- context "when the team is unissiged" do
- let(:player) { "Reu<2><STEAM_1:1:24968171><Unassigned>" }
- its(:"team.value") { should be_nil }
+ context "when the player is a left4dead2 player" do
+ let(:player) { "Pulo_ms<8><STEAM_1:1:41920953><Survivor><Producer><ALIVE><100+0><setpos_exact 3617.36 -1739.69 294.53; setang 0.00 179.84 0.00><Area 205>" }
+ it { should be }
end
end
end
end