Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Ludwig <sebastian@lurado.de>2016-04-26 23:30:27 +0300
committerSebastian Ludwig <sebastian@lurado.de>2016-05-03 23:44:22 +0300
commit2e283d7057166b204d4cdc0ab997b397b9924705 (patch)
treeaecb74ccf403e7abcdf430924bf9125e743580b9
parentb779e112ff305aedfa680cbad82736a830b6f6fd (diff)
Got rid of the Case in test class names.
-rw-r--r--test/command_test.rb (renamed from test/command_test_case.rb)4
-rw-r--r--test/test_abstract_formatter.rb12
-rw-r--r--test/test_cli.rb20
-rw-r--r--test/test_consume_loc_drop.rb4
-rw-r--r--test/test_consume_localization_file.rb6
-rw-r--r--test/test_formatters.rb4
-rw-r--r--test/test_generate_all_localization_files.rb6
-rw-r--r--test/test_generate_loc_drop.rb6
-rw-r--r--test/test_generate_localization_file.rb6
-rw-r--r--test/test_output_processor.rb6
-rw-r--r--test/test_placeholders.rb10
-rw-r--r--test/test_twine_definition.rb4
-rw-r--r--test/test_twine_file.rb8
-rw-r--r--test/test_validate_twine_file.rb4
-rw-r--r--test/twine_test.rb (renamed from test/twine_test_case.rb)2
15 files changed, 50 insertions, 52 deletions
diff --git a/test/command_test_case.rb b/test/command_test.rb
index 6457807..51b642d 100644
--- a/test/command_test_case.rb
+++ b/test/command_test.rb
@@ -1,6 +1,6 @@
-require 'twine_test_case'
+require 'twine_test'
-class CommandTestCase < TwineTestCase
+class CommandTest < TwineTest
def prepare_mock_formatter(formatter_class)
twine_file = Twine::TwineFile.new
twine_file.language_codes.concat KNOWN_LANGUAGES
diff --git a/test/test_abstract_formatter.rb b/test/test_abstract_formatter.rb
index 706e893..efe716e 100644
--- a/test/test_abstract_formatter.rb
+++ b/test/test_abstract_formatter.rb
@@ -1,7 +1,7 @@
-require 'twine_test_case'
+require 'twine_test'
-class TestAbstractFormatter < TwineTestCase
- class SetTranslation < TwineTestCase
+class TestAbstractFormatter < TwineTest
+ class SetTranslation < TwineTest
def setup
super
@@ -76,7 +76,7 @@ class TestAbstractFormatter < TwineTestCase
end
end
- class ValueReference < TwineTestCase
+ class ValueReference < TwineTest
def setup
super
@@ -104,7 +104,7 @@ class TestAbstractFormatter < TwineTestCase
end
end
- class SetComment < TwineTestCase
+ class SetComment < TwineTest
def setup
super
@@ -133,7 +133,7 @@ class TestAbstractFormatter < TwineTestCase
end
end
- class CommentReference < TwineTestCase
+ class CommentReference < TwineTest
def setup
super
diff --git a/test/test_cli.rb b/test/test_cli.rb
index 55d7787..2786a1d 100644
--- a/test/test_cli.rb
+++ b/test/test_cli.rb
@@ -1,6 +1,6 @@
-require 'twine_test_case'
+require 'twine_test'
-class CLITestCase < TwineTestCase
+class CLITest < TwineTest
def setup
super
@@ -13,7 +13,7 @@ class CLITestCase < TwineTestCase
@options = Twine::CLI::parse command.split
end
- class TestValidateTwineFile < CLITestCase
+ class TestValidateTwineFile < CLITest
def test_command
parse "validate-twine-file #{@twine_file_path}"
@@ -39,7 +39,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestGenerateLocalizationFile < CLITestCase
+ class TestGenerateLocalizationFile < CLITest
def test_command
parse "generate-localization-file #{@twine_file_path} #{@output_path}"
@@ -72,7 +72,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestGenerateAllLocalizationFiles < CLITestCase
+ class TestGenerateAllLocalizationFiles < CLITest
def test_command
parse "generate-all-localization-files #{@twine_file_path} #{@output_dir}"
@@ -99,7 +99,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestConsumeLocalizationFile < CLITestCase
+ class TestConsumeLocalizationFile < CLITest
def test_command
parse "consume-localization-file #{@twine_file_path} #{@input_path}"
@@ -127,7 +127,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestConsumeAllLocalizationFiles < CLITestCase
+ class TestConsumeAllLocalizationFiles < CLITest
def test_command
parse "consume-all-localization-files #{@twine_file_path} #{@input_dir}"
@@ -149,7 +149,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestGenerateLocDrop < CLITestCase
+ class TestGenerateLocDrop < CLITest
def test_command
parse "generate-loc-drop #{@twine_file_path} #{@output_path} --format apple"
@@ -182,7 +182,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestConsumeLocDrop < CLITestCase
+ class TestConsumeLocDrop < CLITest
def test_command
parse "consume-loc-drop #{@twine_file_path} #{@input_path}"
@@ -204,7 +204,7 @@ class CLITestCase < TwineTestCase
end
end
- class TestParameters < CLITestCase
+ class TestParameters < CLITest
def parse_with(parameter)
parse 'validate-twine-file input.txt ' + parameter
end
diff --git a/test/test_consume_loc_drop.rb b/test/test_consume_loc_drop.rb
index cfc6d18..a8dddf3 100644
--- a/test/test_consume_loc_drop.rb
+++ b/test/test_consume_loc_drop.rb
@@ -1,6 +1,6 @@
-require 'command_test_case'
+require 'command_test'
-class TestConsumeLocDrop < CommandTestCase
+class TestConsumeLocDrop < CommandTest
def setup
super
diff --git a/test/test_consume_localization_file.rb b/test/test_consume_localization_file.rb
index f0bdf86..b2cd5af 100644
--- a/test/test_consume_localization_file.rb
+++ b/test/test_consume_localization_file.rb
@@ -1,6 +1,6 @@
-require 'command_test_case'
+require 'command_test'
-class TestConsumeLocalizationFile < CommandTestCase
+class TestConsumeLocalizationFile < CommandTest
def new_runner(language, file)
options = {}
options[:output_path] = File.join(@output_dir, file) if file
@@ -51,7 +51,7 @@ class TestConsumeLocalizationFile < CommandTestCase
new_runner(nil, "#{random_language}.xml").consume_localization_file
end
- class TestEncodings < CommandTestCase
+ class TestEncodings < CommandTest
class DummyFormatter < Twine::Formatters::Abstract
attr_reader :content
diff --git a/test/test_formatters.rb b/test/test_formatters.rb
index a8611a9..c40a12a 100644
--- a/test/test_formatters.rb
+++ b/test/test_formatters.rb
@@ -1,6 +1,6 @@
-require 'twine_test_case'
+require 'twine_test'
-class FormatterTest < TwineTestCase
+class FormatterTest < TwineTest
def setup(formatter_class)
super()
diff --git a/test/test_generate_all_localization_files.rb b/test/test_generate_all_localization_files.rb
index 3cda08f..faa1bf1 100644
--- a/test/test_generate_all_localization_files.rb
+++ b/test/test_generate_all_localization_files.rb
@@ -1,6 +1,6 @@
-require 'command_test_case'
+require 'command_test'
-class TestGenerateAllLocalizationFiles < CommandTestCase
+class TestGenerateAllLocalizationFiles < CommandTest
def new_runner(create_folders, twine_file = nil)
options = {}
options[:output_path] = @output_dir
@@ -68,7 +68,7 @@ class TestGenerateAllLocalizationFiles < CommandTestCase
end
end
- class TestValidate < CommandTestCase
+ class TestValidate < CommandTest
def new_runner(validate)
Dir.mkdir File.join @output_dir, 'values-en'
diff --git a/test/test_generate_loc_drop.rb b/test/test_generate_loc_drop.rb
index 3c7c4a3..eb430ea 100644
--- a/test/test_generate_loc_drop.rb
+++ b/test/test_generate_loc_drop.rb
@@ -1,6 +1,6 @@
-require 'command_test_case'
+require 'command_test'
-class TestGenerateLocDrop < CommandTestCase
+class TestGenerateLocDrop < CommandTest
def new_runner(twine_file = nil)
options = {}
options[:output_path] = @output_path
@@ -48,7 +48,7 @@ class TestGenerateLocDrop < CommandTestCase
assert_match "Skipping file", Twine::stderr.string
end
- class TestValidate < CommandTestCase
+ class TestValidate < CommandTest
def new_runner(validate)
options = {}
options[:output_path] = @output_path
diff --git a/test/test_generate_localization_file.rb b/test/test_generate_localization_file.rb
index 3d338c6..0246d50 100644
--- a/test/test_generate_localization_file.rb
+++ b/test/test_generate_localization_file.rb
@@ -1,6 +1,6 @@
-require 'command_test_case'
+require 'command_test'
-class TestGenerateLocalizationFile < CommandTestCase
+class TestGenerateLocalizationFile < CommandTest
def new_runner(language, file)
options = {}
options[:output_path] = File.join(@output_dir, file) if file
@@ -58,7 +58,7 @@ class TestGenerateLocalizationFile < CommandTestCase
end
end
- class TestValidate < CommandTestCase
+ class TestValidate < CommandTest
def new_runner(validate)
options = {}
options[:output_path] = @output_path
diff --git a/test/test_output_processor.rb b/test/test_output_processor.rb
index e51a0ad..a9831b2 100644
--- a/test/test_output_processor.rb
+++ b/test/test_output_processor.rb
@@ -1,6 +1,6 @@
-require 'twine_test_case'
+require 'twine_test'
-class TestOutputProcessor < TwineTestCase
+class TestOutputProcessor < TwineTest
def setup
super
@@ -56,7 +56,7 @@ class TestOutputProcessor < TwineTestCase
assert_equal %w(key1 key2 key3), result.definitions_by_key.keys.sort
end
- class TranslationFallback < TwineTestCase
+ class TranslationFallback < TwineTest
def setup
super
diff --git a/test/test_placeholders.rb b/test/test_placeholders.rb
index 88f363c..f88e9d1 100644
--- a/test/test_placeholders.rb
+++ b/test/test_placeholders.rb
@@ -1,6 +1,6 @@
-require 'twine_test_case'
+require 'twine_test'
-class PlaceholderTestCase < TwineTestCase
+class PlaceholderTest < TwineTest
def assert_starts_with(prefix, value)
msg = message(nil) { "Expected #{mu_pp(value)} to start with #{mu_pp(prefix)}" }
assert value.start_with?(prefix), msg
@@ -17,10 +17,8 @@ class PlaceholderTestCase < TwineTestCase
placeholder += %w(h hh l ll L z j t).sample if lucky.call
placeholder += type || 'diufFeEgGxXocpaA'.chars.to_a.sample # this does not contain s or @ because strings are a special case
end
-end
-class PlaceholderTest < TwineTestCase
- class ToAndroid < PlaceholderTestCase
+ class ToAndroid < PlaceholderTest
def to_android(value)
Twine::Placeholders.convert_placeholders_from_twine_to_android(value)
end
@@ -74,7 +72,7 @@ class PlaceholderTest < TwineTestCase
end
end
- class FromAndroid < PlaceholderTestCase
+ class FromAndroid < PlaceholderTest
def from_android(value)
Twine::Placeholders.convert_placeholders_from_android_to_twine(value)
end
diff --git a/test/test_twine_definition.rb b/test/test_twine_definition.rb
index e25a900..00877cd 100644
--- a/test/test_twine_definition.rb
+++ b/test/test_twine_definition.rb
@@ -1,6 +1,6 @@
-require 'twine_test_case'
+require 'twine_test'
-class TestTwineDefinition < TwineTestCase
+class TestTwineDefinition < TwineTest
def setup
super
diff --git a/test/test_twine_file.rb b/test/test_twine_file.rb
index 65057e5..8bcf73d 100644
--- a/test/test_twine_file.rb
+++ b/test/test_twine_file.rb
@@ -1,7 +1,7 @@
-require 'twine_test_case'
+require 'twine_test'
-class TestTwineFile < TwineTestCase
- class Reading < TwineTestCase
+class TestTwineFile < TwineTest
+ class Reading < TwineTest
def setup
super
@@ -34,7 +34,7 @@ class TestTwineFile < TwineTestCase
end
end
- class Writing < TwineTestCase
+ class Writing < TwineTest
def test_accent_wrapping
@twine_file = build_twine_file 'en' do
diff --git a/test/test_validate_twine_file.rb b/test/test_validate_twine_file.rb
index 65270f0..1e01e43 100644
--- a/test/test_validate_twine_file.rb
+++ b/test/test_validate_twine_file.rb
@@ -1,8 +1,8 @@
# encoding: utf-8
-require 'command_test_case'
+require 'command_test'
-class TestValidateTwineFile < CommandTestCase
+class TestValidateTwineFile < CommandTest
def setup
super
@options = { twine_file: 'input.txt' }
diff --git a/test/twine_test_case.rb b/test/twine_test.rb
index cf4d4d9..efeb045 100644
--- a/test/twine_test_case.rb
+++ b/test/twine_test.rb
@@ -6,7 +6,7 @@ require 'stringio'
require 'twine'
require 'twine_file_dsl'
-class TwineTestCase < Minitest::Test
+class TwineTest < Minitest::Test
include TwineFileDSL
KNOWN_LANGUAGES = %w(en fr de es)