tracks/ruby/test/generator/files/track_files_test.rb in trackler-2.1.0.48 vs tracks/ruby/test/generator/files/track_files_test.rb in trackler-2.1.0.49
- old
+ new
@@ -9,13 +9,13 @@
)
class TestTrackFiles
def initialize
@paths = FixturePaths
- @exercise = Exercise.new(slug: 'alpha-beta')
+ @slug = 'alpha-beta'
end
- attr_reader :paths, :exercise
+ attr_reader :paths, :slug
include TrackFiles
end
def test_tests_version
subject = TestTrackFiles.new
@@ -37,16 +37,21 @@
subject = TestTrackFiles.new
expected_filename = FixturePaths.track + '/exercises/alpha-beta/.meta/generator/test_template.erb'
assert_equal expected_filename, subject.tests_template.filename
end
+ def test_test_case
+ subject = TestTrackFiles.new
+ expected_filename = FixturePaths.track + '/exercises/alpha-beta/.meta/generator/alpha_beta_case.rb'
+ assert_equal expected_filename, subject.test_case.filename
+ end
class TestTrackFilesUseDefault
def initialize
@paths = FixturePaths
- @exercise = Exercise.new(slug: 'notemplate')
+ @slug = 'no-template'
end
- attr_reader :paths, :exercise
+ attr_reader :paths, :slug
include TrackFiles
end
def test_default_tests_template
subject = TestTrackFilesUseDefault.new