diff --git a/test/test_cli.rb b/test/test_cli.rb index 6244da6..36ff91c 100644 --- a/test/test_cli.rb +++ b/test/test_cli.rb @@ -163,7 +163,7 @@ class TestGenerateLocalizationFileCLI < CLITest def test_missing_argument assert_raises Twine::Error do - parse "generate-localization-file #{@twine_file}" + parse "generate-localization-file #{@twine_file_path}" end end diff --git a/test/test_generate_all_localization_files.rb b/test/test_generate_all_localization_files.rb index 61f1c71..d7ef72b 100644 --- a/test/test_generate_all_localization_files.rb +++ b/test/test_generate_all_localization_files.rb @@ -24,10 +24,6 @@ class TestGenerateAllLocalizationFiles < CommandTest def setup super Dir.mkdir File.join @output_dir, 'values-en' - - # both Android and Tizen can handle folders containing `values-en` - android_formatter = prepare_mock_formatter(Twine::Formatters::Android) - tizen_formatter = prepare_mock_formatter(Twine::Formatters::Tizen, false) end def new_runner(options = {}) @@ -60,7 +56,7 @@ class TestGenerateAllLocalizationFiles < CommandTest def test_does_not_create_language_folders Dir.mkdir File.join @output_dir, 'en.lproj' new_runner.generate_all_localization_files - refute File.exists?(File.join(@output_dir, 'es.lproj')), "language folder should not be created" + refute File.exist?(File.join(@output_dir, 'es.lproj')), "language folder should not be created" end def test_prints_empty_file_warnings @@ -86,13 +82,13 @@ class TestGenerateAllLocalizationFiles < CommandTest def test_creates_output_folder FileUtils.remove_entry_secure @output_dir new_runner.generate_all_localization_files - assert File.exists? @output_dir + assert File.exist? @output_dir end def test_creates_language_folders new_runner.generate_all_localization_files - assert File.exists?(File.join(@output_dir, 'en.lproj')), "language folder 'en.lproj' should be created" - assert File.exists?(File.join(@output_dir, 'es.lproj')), "language folder 'es.lproj' should be created" + assert File.exist?(File.join(@output_dir, 'en.lproj')), "language folder 'en.lproj' should be created" + assert File.exist?(File.join(@output_dir, 'es.lproj')), "language folder 'es.lproj' should be created" end def test_prints_empty_file_warnings diff --git a/test/test_generate_localization_archive.rb b/test/test_generate_localization_archive.rb index 075f657..bc84e36 100644 --- a/test/test_generate_localization_archive.rb +++ b/test/test_generate_localization_archive.rb @@ -19,7 +19,7 @@ class TestGenerateLocalizationArchive < CommandTest def test_generates_zip_file new_runner.generate_localization_archive - assert File.exists?(@output_path), "zip file should exist" + assert File.exist?(@output_path), "zip file should exist" end def test_zip_file_structure diff --git a/test/twine_test.rb b/test/twine_test.rb index 5f1e4cd..b3b2118 100644 --- a/test/twine_test.rb +++ b/test/twine_test.rb @@ -1,6 +1,6 @@ require 'erb' require 'minitest/autorun' -require "mocha/mini_test" +require "mocha/minitest" require 'securerandom' require 'stringio' require 'twine' @@ -23,7 +23,7 @@ class TwineTest < Minitest::Test end def teardown - FileUtils.remove_entry_secure @output_dir if File.exists? @output_dir + FileUtils.remove_entry_secure @output_dir if File.exist? @output_dir Twine::Formatters.formatters.clear Twine::Formatters.formatters.concat @formatters super