summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-05-23 18:41:05 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-06-14 23:06:18 -0400
commit8319fc5d3fc86f9a9c4f2ba554df8dd46ec853ce (patch)
tree8612f9ad6f44e54d04a94cc38bcd31a253cc4316
parentb629cffc96830ecf08265deda426b9df2e506a94 (diff)
downloadgitlab-ce-8319fc5d3fc86f9a9c4f2ba554df8dd46ec853ce.tar.gz
Update syntax for spec/features
-rw-r--r--spec/features/gitlab_flavored_markdown_spec.rb3
-rw-r--r--spec/features/profile_spec.rb6
2 files changed, 6 insertions, 3 deletions
diff --git a/spec/features/gitlab_flavored_markdown_spec.rb b/spec/features/gitlab_flavored_markdown_spec.rb
index 16d1ca55f8d..0c1bc53cdb5 100644
--- a/spec/features/gitlab_flavored_markdown_spec.rb
+++ b/spec/features/gitlab_flavored_markdown_spec.rb
@@ -11,7 +11,8 @@ describe "GitLab Flavored Markdown", feature: true do
end
before do
- Commit.any_instance.stub(title: "fix #{issue.to_reference}\n\nask #{fred.to_reference} for details")
+ allow_any_instance_of(Commit).to receive(:title).
+ and_return("fix #{issue.to_reference}\n\nask #{fred.to_reference} for details")
end
let(:commit) { project.commit }
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