test/airbrake_tasks_test.rb in airbrake-3.1.2 vs test/airbrake_tasks_test.rb in airbrake-3.1.3
- old
+ new
@@ -1,6 +1,6 @@
-require File.dirname(__FILE__) + '/helper'
+require File.expand_path '../helper', __FILE__
require 'rubygems'
require File.dirname(__FILE__) + '/../lib/airbrake_tasks'
require 'fakeweb'
@@ -52,11 +52,11 @@
returns(@http_proxy_class)
Net::HTTP::Post.expects(:new).with("/deploys.txt").returns(@post)
@options = { :rails_env => "staging", :dry_run => false }
end
-
+
context "performing a dry run" do
setup { @output = AirbrakeTasks.deploy(@options.merge(:dry_run => true)) }
should "return true without performing any actual request" do
assert_equal true, @output
@@ -138,10 +138,10 @@
setup { @output = AirbrakeTasks.deploy(:rails_env => "staging") }
before_should "post to the custom host" do
@post = stub("post", :set_form_data => nil)
@http_proxy = stub("proxy", :request => @response)
-
+
@http_proxy_class = stub("proxy_class", :new => @http_proxy)
@http_proxy_class.expects(:new).with("custom.host", 80).returns(@http_proxy)
Net::HTTP.expects(:Proxy).with(any_parameters).returns(@http_proxy_class)
Net::HTTP::Post.expects(:new).with("/deploys.txt").returns(@post)
@post.expects(:set_form_data).with(kind_of(Hash))