Sha256: 3d1679a7f56cdff19741fd77524d7ada5a4f7e2c23e87c8d0ceb7192c9ebe7fb
Contents?: true
Size: 1.26 KB
Versions: 22
Compression:
Stored size: 1.26 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"} originator_logger.should_receive(:log).with("Started running 'filename' at 'host'") originator_logger.log_message(payload) end it "prints finish messages" do payload = {:action => "finish", :hostname => "host", :filename => "filename"} originator_logger.should_receive(:log).with("Finished running 'filename' at 'host'") 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", :failures => [ "failure" ]} originator_logger.should_receive(:log).with("Finished running 'filename' at 'host'failure\n") originator_logger.log_message(payload) end end end
Version data entries
22 entries across 22 versions & 1 rubygems