summaryrefslogtreecommitdiff
path: root/spec/models/concerns
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-05-21 17:49:06 -0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-06-22 12:13:46 +0200
commit5a9ede472150ec78f8410ae15cf782095c8f056c (patch)
tree5cbdbfb971329960011e8b3a3544e583f9551f6c /spec/models/concerns
parentdad88568f34bfda5f7fe34672bc5099c80226138 (diff)
downloadgitlab-ce-5a9ede472150ec78f8410ae15cf782095c8f056c.tar.gz
Update mock and stub syntax for specs
Diffstat (limited to 'spec/models/concerns')
-rw-r--r--spec/models/concerns/issuable_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/models/concerns/issuable_spec.rb b/spec/models/concerns/issuable_spec.rb
index 86c395a8e8e..b6d80451d2e 100644
--- a/spec/models/concerns/issuable_spec.rb
+++ b/spec/models/concerns/issuable_spec.rb
@@ -11,7 +11,10 @@ describe Issue, "Issuable" do
end
describe "Validation" do
- before { subject.stub(set_iid: false) }
+ before do
+ allow(subject).to receive(:set_iid).and_return(false)
+ end
+
it { is_expected.to validate_presence_of(:project) }
it { is_expected.to validate_presence_of(:iid) }
it { is_expected.to validate_presence_of(:author) }