webrat/spec/private/core/logging_spec.rb
2009-08-14 13:05:20 -03:00

19 lines
417 B
Ruby

require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
describe Webrat::Logging do
it "should always log outside of Rails and Merb" do
FileUtils.rm("webrat.log")
Webrat.configure do |config|
config.mode = :rack
end
klass = Class.new
klass.send(:include, Webrat::Logging)
klass.new.debug_log "Testing"
File.read("webrat.log").should match(/Testing/)
end
end