diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-23 10:44:03 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-23 10:44:03 +0200 |
commit | f40b99d02ee9411e5a7f9a93e3e6cf33c1d7890e (patch) | |
tree | a55ff4f3ceaa24fcb008114f62b8ac377db6a129 /spec/features | |
parent | 9369adb93d119ca349add2b7f80d6a9b4bbd6703 (diff) | |
parent | 4aa1fdd347d1df4001d9e1298e6dc09c0c478c2e (diff) | |
download | gitlab-ce-f40b99d02ee9411e5a7f9a93e3e6cf33c1d7890e.tar.gz |
Merge branch 'master' into rubocop-for-tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Conflicts:
spec/features/issues_spec.rb
spec/models/forked_project_link_spec.rb
spec/models/hooks/service_hook_spec.rb
spec/models/hooks/web_hook_spec.rb
spec/models/project_services/hipchat_service_spec.rb
spec/requests/api/project_members_spec.rb
spec/requests/api/projects_spec.rb
spec/requests/api/system_hooks_spec.rb
spec/services/archive_repository_service_spec.rb
spec/support/matchers.rb
spec/tasks/gitlab/backup_rake_spec.rb
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/gitlab_flavored_markdown_spec.rb | 3 | ||||
-rw-r--r-- | spec/features/profile_spec.rb | 6 | ||||
-rw-r--r-- | spec/features/profiles/preferences_spec.rb | 2 | ||||
-rw-r--r-- | spec/features/security/profile_access_spec.rb | 2 |
4 files changed, 8 insertions, 5 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 diff --git a/spec/features/profiles/preferences_spec.rb b/spec/features/profiles/preferences_spec.rb index 69d15f41706..03e78c533db 100644 --- a/spec/features/profiles/preferences_spec.rb +++ b/spec/features/profiles/preferences_spec.rb @@ -75,7 +75,7 @@ describe 'Profile > Preferences' do end def expect_preferences_saved_message - within('.flash-container') do + page.within('.flash-container') do expect(page).to have_content('Preferences saved.') end end diff --git a/spec/features/security/profile_access_spec.rb b/spec/features/security/profile_access_spec.rb index 2b09771851e..8f7a9606262 100644 --- a/spec/features/security/profile_access_spec.rb +++ b/spec/features/security/profile_access_spec.rb @@ -6,7 +6,7 @@ describe "Profile access", feature: true do end describe "GET /login" do - it { expect(new_user_session_path).not_to be_404_for :visitor } + it { expect(new_user_session_path).not_to be_not_found_for :visitor } end describe "GET /profile/keys" do |