using stub to create test doubles is deprecated, use double directly
This commit is contained in:
parent
3946fe43b4
commit
7e3df143ed
|
@ -249,7 +249,7 @@ describe Capybara::Webkit::Browser do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "doesn't try to read an empty response" do
|
it "doesn't try to read an empty response" do
|
||||||
connection = stub("connection")
|
connection = double("connection")
|
||||||
connection.stub(:puts)
|
connection.stub(:puts)
|
||||||
connection.stub(:print)
|
connection.stub(:print)
|
||||||
connection.stub(:gets).and_return("ok\n", "0\n")
|
connection.stub(:gets).and_return("ok\n", "0\n")
|
||||||
|
|
|
@ -53,7 +53,7 @@ describe Capybara::Webkit::Connection do
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'sets appropriate options on its socket' do
|
it 'sets appropriate options on its socket' do
|
||||||
socket = stub('socket')
|
socket = double('socket')
|
||||||
TCPSocket.stub(:open).and_return(socket)
|
TCPSocket.stub(:open).and_return(socket)
|
||||||
if defined?(Socket::TCP_NODELAY)
|
if defined?(Socket::TCP_NODELAY)
|
||||||
socket.should_receive(:setsockopt).with(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)
|
socket.should_receive(:setsockopt).with(Socket::IPPROTO_TCP, Socket::TCP_NODELAY, true)
|
||||||
|
|
Loading…
Reference in New Issue