Sha256: 5342095d4f99f407e20460cf7f60f9361fc7bbef0bffd5b91c54362424ebda2b
Contents?: true
Size: 736 Bytes
Versions: 12
Compression:
Stored size: 736 Bytes
Contents
require File.expand_path("#{File.dirname(__FILE__)}/../spec_helper") describe ActiveWrapper::Log do before(:each) do FileUtils.rm_f(@path = SPEC + "/example_project/log/test.log") $db, $log, $mail = ActiveWrapper.setup( :base => SPEC + '/example_project', :env => 'test' ) end it "should create a log file" do File.exists?(@path).should == true end it "should log to the log file" do $log.info "test" File.read(@path).include?('test').should == true end it "should clear the log file while keeping the logger intact" do $log.clear File.read(@path).include?('test').should == false $log.info "test" File.read(@path).include?('test').should == true end end
Version data entries
12 entries across 12 versions & 2 rubygems