• Download Gist
0001-Use-as_null_object-to-be-RSpec2-compatible.patch
Diff
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
From 0cb6a9821a15ff16b414bd49c3ffbfef653af336 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 29 Nov 2011 15:53:24 +0100
Subject: [PATCH] Use as_null_object to be RSpec2 compatible
 
---
spec/backends/swiftiply_client_spec.rb | 4 ++--
spec/connection_spec.rb | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
 
diff --git a/spec/backends/swiftiply_client_spec.rb b/spec/backends/swiftiply_client_spec.rb
index a5693b0..036a6a8 100644
--- a/spec/backends/swiftiply_client_spec.rb
+++ b/spec/backends/swiftiply_client_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper'
describe Backends::SwiftiplyClient do
before do
@backend = Backends::SwiftiplyClient.new('0.0.0.0', 3333)
- @backend.server = mock('server', :null_object => true)
+ @backend.server = mock('server').as_null_object
end
it "should connect" do
@@ -26,7 +26,7 @@ describe SwiftiplyConnection do
before do
@connection = SwiftiplyConnection.new(nil)
@connection.backend = Backends::SwiftiplyClient.new('0.0.0.0', 3333)
- @connection.backend.server = mock('server', :null_object => true)
+ @connection.backend.server = mock('server').as_null_object
end
it do
diff --git a/spec/connection_spec.rb b/spec/connection_spec.rb
index 9035615..b043937 100644
--- a/spec/connection_spec.rb
+++ b/spec/connection_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper'
describe Connection do
before do
- @connection = Connection.new(mock('EM', :null_object => true))
+ @connection = Connection.new(mock('EM').as_null_object)
@connection.post_init
@connection.backend = mock("backend", :ssl? => false)
@connection.app = proc do |env|
--
1.7.7.3

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.