summaryrefslogtreecommitdiff
path: root/spec/features/profile_spec.rb
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/features/profile_spec.rb
parentdad88568f34bfda5f7fe34672bc5099c80226138 (diff)
downloadgitlab-ce-5a9ede472150ec78f8410ae15cf782095c8f056c.tar.gz
Update mock and stub syntax for specs
Diffstat (limited to 'spec/features/profile_spec.rb')
-rw-r--r--spec/features/profile_spec.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/features/profile_spec.rb b/spec/features/profile_spec.rb
index 3d36a3c02d0..9fe2e610555 100644
--- a/spec/features/profile_spec.rb
+++ b/spec/features/profile_spec.rb
@@ -9,7 +9,8 @@ describe 'Profile account page', feature: true do
describe 'when signup is enabled' do
before do
- ApplicationSetting.any_instance.stub(signup_enabled?: true)
+ allow_any_instance_of(ApplicationSetting).
+ to receive(:signup_enabled?).and_return(true)
visit profile_account_path
end
@@ -23,7 +24,8 @@ describe 'Profile account page', feature: true do
describe 'when signup is disabled' do
before do
- ApplicationSetting.any_instance.stub(signup_enabled?: false)
+ allow_any_instance_of(ApplicationSetting).
+ to receive(:signup_enabled?).and_return(false)
visit profile_account_path
end