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

- old
+ new

@@ -18,16 +18,18 @@ describe "command" do subject { parser.parse(text).command } it { should be } end - end - describe "commands" do - describe "rcon command" do - let(:text) { 'L 12/26/2011 - 02:14:33: Rcon: "rcon challenge "password" command" from "192.168.10.1:17015"' } - subject { parser.parse(text).command } - it_should_behave_like "a rcon command", :password => "password", :origin => "//192.168.10.1:17015" + context "when there are garbage before the log line" do + let(:text) { '????RL 12/26/2011 - 02:14:29: Loading map "c4m2_sugarmill_a"' } + it { should be } + end + + context "when there is a line break after the log line" do + let(:text) { "L 12/26/2011 - 02:14:29: server cvars start\n" } + it { should be } end end end end end