Sha256: 4a3d58c17b4cce91f4d086c96dbc982c7fb76f73b7fc4ec92e214743903359eb
Contents?: true
Size: 1.43 KB
Versions: 24
Compression:
Stored size: 1.43 KB
Contents
require 'gorgon/originator_logger' describe OriginatorLogger do before do OriginatorLogger.any_instance.stub(:initialize_logger) end let (:originator_logger) { OriginatorLogger.new "" } describe "#log_message" do it "prints start messages" do payload = {:action => "start", :hostname => "host", :filename => "filename", :worker_id => "a_worker_id"} originator_logger.should_receive(:log).with("Started running 'filename' at 'host:a_worker_id'") originator_logger.log_message(payload) end it "prints finish messages" do payload = {:action => "finish", :hostname => "host", :filename => "filename", :worker_id => "a_worker_id"} originator_logger.should_receive(:log).with("Finished running 'filename' at 'host:a_worker_id'") originator_logger.log_message(payload) end it "prints failure messages when a test finishes with failures" do payload = {:action => "finish", :type => "fail", :hostname => "host", :filename => "filename", :worker_id => "a_worker_id", :failures => [ "failure" ]} originator_logger.should_receive(:log).with("Finished running 'filename' at 'host:a_worker_id'failure\n") originator_logger.log_message(payload) end end end
Version data entries
24 entries across 24 versions & 1 rubygems