From ba44420a2184476fb4c76b3b797b5d1e3e714c8a Mon Sep 17 00:00:00 2001 From: Paco Guzman Date: Mon, 10 Oct 2016 14:21:28 +0200 Subject: Instrument GitLab Shell and log metrics data to a file --- spec/gitlab_keys_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/gitlab_keys_spec.rb') diff --git a/spec/gitlab_keys_spec.rb b/spec/gitlab_keys_spec.rb index 67f9f40..c1c3854 100644 --- a/spec/gitlab_keys_spec.rb +++ b/spec/gitlab_keys_spec.rb @@ -53,7 +53,7 @@ describe GitlabKeys do end context "without file writing" do - before { gitlab_keys.stub(:open) } + before { allow(gitlab_keys).to receive(:open) } before { create_authorized_keys_fixture } it "should log an add-key event" do @@ -106,7 +106,7 @@ describe GitlabKeys do context "without file writing" do before do - gitlab_keys.should_receive(:open).and_yield(mock(:file, puts: nil, chmod: nil)) + gitlab_keys.should_receive(:open).and_yield(double(:file, puts: nil, chmod: nil)) end it "should log an add-key event" do -- cgit v1.2.1