From 5a9ede472150ec78f8410ae15cf782095c8f056c Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Thu, 21 May 2015 17:49:06 -0400 Subject: Update mock and stub syntax for specs --- spec/models/namespace_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'spec/models/namespace_spec.rb') diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index e87432fdf62..1d72a9503ae 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -53,7 +53,7 @@ describe Namespace do describe :move_dir do before do @namespace = create :namespace - @namespace.stub(path_changed?: true) + allow(@namespace).to receive(:path_changed?).and_return(true) end it "should raise error when directory exists" do @@ -62,8 +62,8 @@ describe Namespace do it "should move dir if path changed" do new_path = @namespace.path + "_new" - @namespace.stub(path_was: @namespace.path) - @namespace.stub(path: new_path) + allow(@namespace).to receive(:path_was).and_return(@namespace.path) + allow(@namespace).to receive(:path).and_return(new_path) expect(@namespace.move_dir).to be_truthy end end -- cgit v1.2.1