using stub to create test doubles is deprecated, use double directly

This commit is contained in:
Jon Rowe 2013-08-11 15:38:19 +01:00
parent 3946fe43b4
commit 7e3df143ed
2 changed files with 2 additions and 2 deletions

View File

@ -249,7 +249,7 @@ describe Capybara::Webkit::Browser do
end
it "doesn't try to read an empty response" do
connection = stub("connection")
connection = double("connection")
connection.stub(:puts)
connection.stub(:print)
connection.stub(:gets).and_return("ok\n", "0\n")

View File

@ -53,7 +53,7 @@ describe Capybara::Webkit::Connection do
end
it 'sets appropriate options on its socket' do
socket = stub('socket')
socket = double('socket')
TCPSocket.stub(:open).and_return(socket)
if defined?(Socket::TCP_NODELAY)
socket.should_receive(:setsockopt).with(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)