Applied rubocop cop 'Style/Next' and 'Style/UselessAssignment'.
This commit is contained in:
parent
81e14dd961
commit
70e126a95c
1 changed files with 11 additions and 11 deletions
|
@ -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,16 +280,17 @@ 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]
|
||||||
test[:verify][:check_files].each {|item|
|
next if !test[:verify][:check_files]
|
||||||
exists = File.exist?( item[:location] )
|
|
||||||
if item[:result]
|
test[:verify][:check_files].each {|item|
|
||||||
assert( exists, "'#{item[:location]}' exists" )
|
exists = File.exist?( item[:location] )
|
||||||
else
|
if item[:result]
|
||||||
assert( !exists, "'#{item[:location]}' doesn't exists" )
|
assert( exists, "'#{item[:location]}' exists" )
|
||||||
end
|
else
|
||||||
}
|
assert( !exists, "'#{item[:location]}' doesn't exists" )
|
||||||
end
|
end
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue