spec/lib/appsignal/capistrano3_spec.rb in appsignal-1.3.5 vs spec/lib/appsignal/capistrano3_spec.rb in appsignal-1.3.6.beta.1

- old
+ new

@@ -12,20 +12,13 @@ before do @capistrano_config = Capistrano::Configuration.env @capistrano_config.set(:log_level, :error) @capistrano_config.set(:logger, logger) - end - before do - @original_stdout = $stdout - $stdout = out_stream - @original_stderr = $stderr - $stderr = out_stream - end - after do - $stdout = @original_stdout - $stderr = @original_stderr Rake::Task['appsignal:deploy'].reenable + end + around do |example| + capture_std_streams(out_stream, out_stream) { example.run } end it "should have a deploy task" do Rake::Task.task_defined?('appsignal:deploy').should be_true end