Created
November 29, 2011 14:54
-
-
Save voxik/1405072 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0cb6a9821a15ff16b414bd49c3ffbfef653af336 Mon Sep 17 00:00:00 2001 | |
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <[email protected]> | |
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 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment