tracks/ruby/test/generator/template_values_test.rb in trackler-2.1.0.11 vs tracks/ruby/test/generator/template_values_test.rb in trackler-2.1.0.12

- old
+ new

@@ -1,9 +1,9 @@ require_relative '../test_helper' module Generator - class TestCasesValuesTest < Minitest::Test + class TestTemplateValuesTest < Minitest::Test def setup @arguments = { abbreviated_commit_hash: nil, version: nil, exercise_name: nil, test_cases: nil } end @@ -20,17 +20,17 @@ assert_equal expected_version, subject.version end def test_exercise_name expected_exercise_name = 'alpha_beta' - subject = TemplateValues.new(@arguments.merge(exercise_name: 'alpha-beta')) + subject = TemplateValues.new(@arguments.merge(exercise_name: expected_exercise_name)) assert_equal expected_exercise_name, subject.exercise_name end def test_exercise_name_camel expected_exercise_name_camel = 'AlphaBeta' - subject = TemplateValues.new(@arguments.merge(exercise_name: 'alpha-beta')) + subject = TemplateValues.new(@arguments.merge(exercise_name: 'alpha_beta')) assert_equal expected_exercise_name_camel, subject.exercise_name_camel end def test_test_cases expected_test_cases = 'should be TemplateValues class' @@ -44,11 +44,11 @@ end end class TemplateValuesFactoryTest < Minitest::Test class TestTemplateValuesFactory - def exercise_name + def slug 'alpha' end def version 2 @@ -70,11 +70,11 @@ include TemplateValuesFactory end class ClassBasedTestTemplateValuesFactory - def exercise_name + def slug 'beta' end def version 2 @@ -104,10 +104,9 @@ def test_template_values_loads_problem_case_classes subject = TestTemplateValuesFactory.new assert_instance_of TemplateValues, subject.template_values assert Object.const_defined?(:AlphaCase) - assert Object.const_defined?(:AlphaCases) end def teardown [:AlphaCase, :AlphaCases].each do |classname| if Object.const_defined?(classname)