Sha256: 7abe780e7f3fd647c9c032376ba6336722644368720c74d184d5216741bacb2a
Contents?: true
Size: 744 Bytes
Versions: 1
Compression:
Stored size: 744 Bytes
Contents
require "spec_helper" describe Proselytism do context "log" do it "should log with class and time data" do subject.config.logger.should_receive(:debug).with do |message| message.should match /Proselytism/ message.should match /io/ message.should match Time.now.strftime("%Y-%m-%d") end subject.log(:debug, 'io').should be_true end it "should log delay when a block is passed" do subject.config.logger.should_receive(:debug).with do |message| message.should match /Proselytism/ message.should match /io/ message.should match /([\d:]+)/ end subject.log :debug , 'io' do sleep(0.5) false end.should be_false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
proselytism-0.0.1 | spec/shared_spec.rb |