Sha256: 2b92c8492854561b3e1d3edccca389dc46cab01b11b411b39ec36daf2c40ba80
Contents?: true
Size: 732 Bytes
Versions: 4
Compression:
Stored size: 732 Bytes
Contents
require 'spec_helper' require 'tempfile' describe Gom::Logger do it "should find the class" do Gom::Logger.should_not == nil end describe "with a Logger" do let(:logfile) { Tempfile.new(File.basename(__FILE__)) } let(:log) { Gom::Logger.new logfile.path } it "should have a default 'I' log level" do log.info self.to_s (line = logfile.read).should_not == nil line.should =~ / I #{self.to_s}/ end it "should log execeptions" do raise "foo" rescue log.ex $!, "bar" (txt = logfile.read).should_not == nil #assert_match " E RuntimeError: bar", txt, logfile.path txt.should =~ / E foo: bar/ txt.should =~ / D foo -- callstack: bar/ end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
gom-core-0.2.8 | spec/unit/gom/logger_spec.rb |
gom-core-0.2.7 | spec/unit/gom/logger_spec.rb |
gom-core-0.2.6 | spec/unit/gom/logger_spec.rb |
gom-core-0.2.5 | spec/gom/logger_spec.rb |