tracks/ruby/test/generator/template_values_test.rb in trackler-2.1.0.36 vs tracks/ruby/test/generator/template_values_test.rb in trackler-2.1.0.37

- old
+ new

@@ -44,12 +44,12 @@ end end class TemplateValuesFactoryTest < Minitest::Test class TestTemplateValuesFactory - def slug - 'alpha' + def exercise + Exercise.new(slug: 'alpha') end def version 2 end @@ -67,40 +67,9 @@ mock_paths.expect :track, 'test/fixtures/xruby' mock_paths end include TemplateValuesFactory - end - - class ClassBasedTestTemplateValuesFactory - def slug - 'beta' - end - - def version - 2 - end - - def canonical_data - mock_canonical_data = Minitest::Mock.new - mock_canonical_data.expect :abbreviated_commit_hash, nil - mock_canonical_data.expect :version, '1.2.3' - mock_canonical_data.expect :to_s, '{"cases":[]}' - mock_canonical_data - end - - def paths - mock_paths = Minitest::Mock.new - mock_paths.expect :track, 'test/fixtures/xruby' - mock_paths - end - - include TemplateValuesFactory - end - - def test_template_values_from_class - subject = ClassBasedTestTemplateValuesFactory.new - assert_instance_of TemplateValues, subject.template_values end def test_template_values_loads_problem_case_classes subject = TestTemplateValuesFactory.new assert_instance_of TemplateValues, subject.template_values