spec/loggability/override_spec.rb in loggability-0.9.0.pre.73 vs spec/loggability/override_spec.rb in loggability-0.9.0

- old
+ new

@@ -53,11 +53,11 @@ level_override.call do loghost.logger.debug "But this should." end loghost.logger.debug "This shouldn't either." - expect( log ).to have( 1 ).log_entry + expect( log.size ).to eq( 1 ) end it "has a constructor delegator for its level mutator" do override = described_class.with_level( :debug ) @@ -78,12 +78,12 @@ output_override.call do loghost.logger.debug "This should be output to the overridden destination" end loghost.logger.debug "This should be output to the original destination" - expect( original_destination ).to have( 2 ).log_entries - expect( new_destination ).to have( 1 ).log_entry + expect( original_destination.size ).to eq( 2 ) + expect( new_destination.size ).to eq( 1 ) end it "has a constructor delegator for its output mutator" do log = [] @@ -106,12 +106,12 @@ end loghost.logger.debug "This should be in the default format again" html_log = log.grep( /<div/ ) - expect( log ).to have( 3 ).entries - expect( html_log ).to have( 1 ).entry + expect( log.size ).to eq( 3 ) + expect( html_log.size ).to eq( 1 ) end it "has a constructor delegator for its format mutator" do override = described_class.formatted_with( :color ) @@ -140,10 +140,10 @@ :did_it end expect( result ).to eq( :did_it ) - expect( log ).to have( 1 ).entry + expect( log.size ).to eq( 1 ) expect( log.first ).to match( /Doing it!/ ) end end