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/projects | |
parent | 75a40ad5bcee37f43fcfe89789dbd8c65be56c21 (diff) |
Change `foo.should` syntax to `expect(foo).to` in specs
Diffstat (limited to 'spec/services/projects')
-rw-r--r-- | spec/services/projects/destroy_service_spec.rb | 8 | ||||
-rw-r--r-- | spec/services/projects/transfer_service_spec.rb | 6 |
2 files changed, 6 insertions, 8 deletions
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 |