Fixed redundant begin block

This commit is contained in:
Brenda Wallace committed 2019-01-01 13:38:37 +13:00
1 parent 164e43f054
commit c7ad7bcc70
2 files changed
+8 -12

No files matched your search

+5 -7
View File
@@ -1,11 +1,9 @@
#!/usr/bin/env ruby
APP_ROOT = File.expand_path('..', __dir__)
Dir.chdir(APP_ROOT) do
begin
exec "yarnpkg", *ARGV
rescue Errno::ENOENT
warn "Yarn executable was not detected in the system."
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
end
exec "yarnpkg", *ARGV
rescue Errno::ENOENT
warn "Yarn executable was not detected in the system."
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
end
@@ -29,11 +29,9 @@ describe PhotoAssociationsController do
it do
expect do
begin
delete :destroy, params: valid_params
rescue StandardError
nil
end
delete :destroy, params: valid_params
rescue StandardError
nil
end.not_to change(photo.harvests, :count)
end