Crystal largest series product -- strange test result

We received the following error when we ran your code:
Showing last frame. Use --error-trace for full trace.

In spec/modified_test_spec.cr:25:14

 25 | series = LargestSeriesProduct.new("29")
               ^-------------------
Error: undefined constant LargestSeriesProduct

Where is spec/modified_test_spec.cr discussed? It doesn’t appear when one downloads for cli access. And the normal tester calls the function largest_product not LargestSeriesProduct

-Bruce

the normal tester calls the function largest_product not LargestSeriesProduct

The test is

  it "finds the largest product if span equals length" do
    series = LargestSeriesProduct.new("29")
    series.largest_product(2).should eq(18)
  end

Looks like you are expected to write a LargestSeriesProduct class that provides largest_product as an instance method.

spec/modified_test_spec.cr […] doesn’t appear when one downloads for cli access

I just tried it and it downloaded for me: No, I misread the question.

2 Likes

That’s generated during the run by the test runner using crystal-test-runner/helpers/setup_test_file.cr at main · exercism/crystal-test-runner · GitHub. It isn’t exposed to the student.