test/test_epubmaker_cmd.rb in review-5.3.0 vs test/test_epubmaker_cmd.rb in review-5.4.0
- old
+ new
@@ -19,11 +19,11 @@
FileUtils.rm_rf(@tmpdir1)
ENV['RUBYLIB'] = @old_rubylib
end
def common_buildepub(bookdir, configfile, targetepubfile)
- if /mswin|mingw|cygwin/ !~ RUBY_PLATFORM
+ unless /mswin|mingw|cygwin/.match?(RUBY_PLATFORM)
config = prepare_samplebook(@tmpdir1, bookdir, nil, configfile)
builddir = File.join(@tmpdir1, config['bookname'] + '-epub')
assert !File.exist?(builddir)
ruby_cmd = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) + RbConfig::CONFIG['EXEEXT']
@@ -33,10 +33,10 @@
assert File.exist?(File.join(@tmpdir1, targetepubfile))
end
end
def check_filesize(epubfile)
- if /mswin|mingw|cygwin/ !~ RUBY_PLATFORM
+ unless /mswin|mingw|cygwin/.match?(RUBY_PLATFORM)
Zip::File.open(epubfile) do |zio|
zio.each do |entry|
assert_not_equal(0, entry.size, "#{entry.name} is 0 byte.")
end
end