Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorIlya Zhitomirskiy <iz268@nyu.edu>2011-10-31 23:37:37 +0400
committerIlya Zhitomirskiy <iz268@nyu.edu>2011-10-31 23:38:00 +0400
commitea72b1ae5745b23b1d0b2219d1b7f1ee0759ce74 (patch)
tree8c05d264ec1f88fd25bafd92e08d58c8f30d0290 /spec
parent82fabbadd14af8d224771dca8108ebd52fc9ce96 (diff)
remove custom logging, added hoptoad backend directly
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/resque_job_logging_spec.rb35
1 files changed, 0 insertions, 35 deletions
diff --git a/spec/lib/resque_job_logging_spec.rb b/spec/lib/resque_job_logging_spec.rb
index 835eef484..2401e94fa 100644
--- a/spec/lib/resque_job_logging_spec.rb
+++ b/spec/lib/resque_job_logging_spec.rb
@@ -5,39 +5,4 @@
require 'spec_helper'
describe ResqueJobLogging do
- before do
- Rails.stub!(:logger).and_return(mock())
- Rails.logger.should_receive(:auto_flushing=).with(1)
-
- silence_warnings { Object.const_set("ResqueJobLoggingDummy", Class.new(Object)) }
- ResqueJobLoggingDummy.extend(ResqueJobLogging)
- end
-
- after do
- Rails.unstub!(:logger)
- end
-
- # http://bugs.joindiaspora.com/issues/741
- it "should enumerate arguments" do
- Rails.logger.should_receive(:info).with(/arg1="foo" arg2="bar" arg3="baz"/)
- ## pass a nil block, so we can test the .info() output
- ResqueJobLoggingDummy.around_perform_log_job("foo", "bar", "baz") {}
- end
- it 'logs stack traces on failure' do
- Rails.logger.should_receive(:info).with(/app_backtrace=/)
- error = RuntimeError.new("GRAAAAAAAAAGH")
- proc {
- ResqueJobLoggingDummy.around_perform_log_job("stuff"){raise error}
- }.should raise_error(Regexp.new(error.message))
- end
-
- it 'notifies hoptoad if the hoptoad api key is set' do
- Rails.logger.should_receive(:info)
- AppConfig.should_receive(:[]).with(:hoptoad_api_key).and_return("what")
- error = RuntimeError.new("GRAAAAAAAAAGH")
- ResqueJobLoggingDummy.should_receive(:notify_hoptoad).with(error, ["stuff"])
- proc {
- ResqueJobLoggingDummy.around_perform_log_job("stuff"){raise error }
- }.should raise_error(Regexp.new(error.message))
- end
end