diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-05-22 00:49:06 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-22 13:13:46 +0300 |
commit | 5a9ede472150ec78f8410ae15cf782095c8f056c (patch) | |
tree | 5cbdbfb971329960011e8b3a3544e583f9551f6c /spec/models/namespace_spec.rb | |
parent | dad88568f34bfda5f7fe34672bc5099c80226138 (diff) |
Update mock and stub syntax for specs
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
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 |