(t *testing.T)
| 71 | } |
| 72 | |
| 73 | func TestIncludesTestFilesInCommand(t *testing.T) { |
| 74 | testConfig, ok := TestConfigurations["ruby"] |
| 75 | assert.True(t, ok, "unexpectedly unable to find ruby test config") |
| 76 | |
| 77 | // this creates a config file in the test directory and removes it |
| 78 | dir := filepath.Join(".", ".exercism") |
| 79 | defer os.RemoveAll(dir) |
| 80 | err := os.Mkdir(dir, os.ModePerm) |
| 81 | assert.NoError(t, err) |
| 82 | |
| 83 | f, err := os.Create(filepath.Join(dir, "config.json")) |
| 84 | assert.NoError(t, err) |
| 85 | defer f.Close() |
| 86 | |
| 87 | _, err = f.WriteString(`{ "blurb": "Learn about the basics of Ruby by following a lasagna recipe.", "authors": ["iHiD", "pvcarrera"], "files": { "solution": ["lasagna.rb"], "test": ["lasagna_test.rb", "some_other_file.rb"], "exemplar": [".meta/exemplar.rb"] } } `) |
| 88 | assert.NoError(t, err) |
| 89 | |
| 90 | cmd, err := testConfig.GetTestCommand() |
| 91 | assert.NoError(t, err) |
| 92 | assert.Equal(t, cmd, "ruby lasagna_test.rb some_other_file.rb") |
| 93 | } |
| 94 | |
| 95 | func TestRustHasTrailingDashes(t *testing.T) { |
| 96 | testConfig, ok := TestConfigurations["rust"] |
nothing calls this directly
no test coverage detected