Applied rubocop cop 'Style/Next' and 'Style/UselessAssignment'.

This commit is contained in:
Thorsten Eckel 2015-07-03 19:42:22 +02:00
parent 81e14dd961
commit 70e126a95c

View file

@ -1,5 +1,4 @@
# encoding: utf-8 # encoding: utf-8
# rubocop:disable Next, UselessAssignment
require 'test_helper' require 'test_helper'
class PackageTest < ActiveSupport::TestCase class PackageTest < ActiveSupport::TestCase
@ -281,7 +280,9 @@ X3RhYmxlIDpzYW1wbGVfdGFibGVzDQogIGVuZA0KZW5k</file>
exists = Package.where( name: test[:verify][:package][:name], version: test[:verify][:package][:version] ).first exists = Package.where( name: test[:verify][:package][:name], version: test[:verify][:package][:version] ).first
assert( exists, "package '#{test[:verify][:package][:name]}' is not installed" ) assert( exists, "package '#{test[:verify][:package][:name]}' is not installed" )
end end
if test[:verify] && test[:verify][:check_files] next if !test[:verify]
next if !test[:verify][:check_files]
test[:verify][:check_files].each {|item| test[:verify][:check_files].each {|item|
exists = File.exist?( item[:location] ) exists = File.exist?( item[:location] )
if item[:result] if item[:result]
@ -290,7 +291,6 @@ X3RhYmxlIDpzYW1wbGVfdGFibGVzDQogIGVuZA0KZW5k</file>
assert( !exists, "'#{item[:location]}' doesn't exists" ) assert( !exists, "'#{item[:location]}' doesn't exists" )
end end
} }
end
} }
end end