diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-14 01:24:51 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-14 01:37:30 +0300 |
commit | 422236c71eb8f1c88e83331b6eb74211fd7ccf49 (patch) | |
tree | 45066da8510fcd65d87eaa390261be94fb58c457 /spec/services | |
parent | 75a40ad5bcee37f43fcfe89789dbd8c65be56c21 (diff) |
Change `foo.should` syntax to `expect(foo).to` in specs
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/destroy_group_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/services/projects/destroy_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/services/projects/transfer_service_spec.rb | 6 |
3 files changed, 10 insertions, 12 deletions
diff --git a/spec/services/destroy_group_service_spec.rb b/spec/services/destroy_group_service_spec.rb index 2a7372b986e..e28564b3866 100644 --- a/spec/services/destroy_group_service_spec.rb +++ b/spec/services/destroy_group_service_spec.rb @@ -23,8 +23,8 @@ describe DestroyGroupService do Sidekiq::Testing.inline! { destroy_group(group, user) } end - it { gitlab_shell.exists?(group.path).should be_falsey } - it { gitlab_shell.exists?(remove_path).should be_falsey } + it { expect(gitlab_shell.exists?(group.path)).to be_falsey } + it { expect(gitlab_shell.exists?(remove_path)).to be_falsey } end context 'Sidekiq fake' do @@ -33,8 +33,8 @@ describe DestroyGroupService do Sidekiq::Testing.fake! { destroy_group(group, user) } end - it { gitlab_shell.exists?(group.path).should be_falsey } - it { gitlab_shell.exists?(remove_path).should be_truthy } + it { expect(gitlab_shell.exists?(group.path)).to be_falsey } + it { expect(gitlab_shell.exists?(remove_path)).to be_truthy } end end diff --git a/spec/services/projects/destroy_service_spec.rb b/spec/services/projects/destroy_service_spec.rb index 381008def5f..e83eef0b1a2 100644 --- a/spec/services/projects/destroy_service_spec.rb +++ b/spec/services/projects/destroy_service_spec.rb @@ -13,8 +13,8 @@ describe Projects::DestroyService do end it { expect(Project.all).not_to include(project) } - it { Dir.exists?(path).should be_falsey } - it { Dir.exists?(remove_path).should be_falsey } + it { expect(Dir.exists?(path)).to be_falsey } + it { expect(Dir.exists?(remove_path)).to be_falsey } end context 'Sidekiq fake' do @@ -24,8 +24,8 @@ describe Projects::DestroyService do end it { expect(Project.all).not_to include(project) } - it { Dir.exists?(path).should be_falsey } - it { Dir.exists?(remove_path).should be_truthy } + it { expect(Dir.exists?(path)).to be_falsey } + it { expect(Dir.exists?(remove_path)).to be_truthy } end def destroy_project(project, user, params) diff --git a/spec/services/projects/transfer_service_spec.rb b/spec/services/projects/transfer_service_spec.rb index 5650626fb18..79acba78bda 100644 --- a/spec/services/projects/transfer_service_spec.rb +++ b/spec/services/projects/transfer_service_spec.rb @@ -20,8 +20,7 @@ describe Projects::TransferService do @result = transfer_project(project, user, new_namespace_id: nil) end - it { expect(@result).not_to be_nil } # { result.should be_false } passes on nil - it { expect(@result).to be_falsey } + it { expect(@result).to eq false } it { expect(project.namespace).to eq(user.namespace) } end @@ -30,8 +29,7 @@ describe Projects::TransferService do @result = transfer_project(project, user, new_namespace_id: group.id) end - it { expect(@result).not_to be_nil } # { result.should be_false } passes on nil - it { expect(@result).to be_falsey } + it { expect(@result).to eq false } it { expect(project.namespace).to eq(user.namespace) } end |