Sha256: ba1ec8545f258dd4f6581230baf8bc8b47dd97c5b4652fdc6c820b5b9cbb6277

Contents?: true

Size: 827 Bytes

Versions: 1

Compression:

Stored size: 827 Bytes

Contents

require "spec_helper"

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

      subject { parser.parse(rcon_command) }

      context "with a successfully rcon challenge" do
        let(:rcon_command) { 'Rcon: "rcon challenge "password" command" from "192.168.10.1:17015"' }
        it_should_behave_like "a rcon command", :password => "password", :origin => "//192.168.10.1:17015"
        its(:value) { should == "successfully rcon" }
      end

      context "with a bad rcon challenge" do
        let(:rcon_command) { 'Bad Rcon: "rcon challenge "password" command" from "192.168.10.1:17015"' }
        it_should_behave_like "a rcon command", :password => "password", :origin => "//192.168.10.1:17015"
        its(:value) { should == "bad rcon" }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fonte-0.2.0 spec/parsers/rcon_parser_spec.rb