Closed toppa closed 9 years ago
...And as soon as I posted that, I think I've realized the problem. I have a series of "CustomerValueModel" classes, and a test file for each one. The class files each live in different subdirectories, but they all have the same class name. In the web app, there is one loaded per page, so they never interfere with each other. I'm guessing in Teaspoon, when I run the suite, they are colliding with each other in some fashion (I require each class file at the top of its test file). All the errors happen in method calls, with "Failure/Error: undefined is not a constructor". Is there a way to isolate the runs of each test file from the others, short of making a separate Teaspoon suite for every test file?
And I resolved it by reworking the app structure a bit so all the class names are unique. Now my test suite is running fine. I am my own rubber duck.
:) I enjoy seeing people solve their issues, no worries.
Jeremy Jackson
On Oct 2, 2015, at 8:31 PM, Michael Toppa notifications@github.com wrote:
And I resolved it by reworking the app structure a bit so all the class names are unique. Now my test suite is running fine. I am my own rubber duck.
— Reply to this email directly or view it on GitHub.
🍺
On Oct 2, 2015, at 9:16 PM, Jeremy Jackson notifications@github.com wrote:
:) I enjoy seeing people solve their issues, no worries.
Jeremy Jackson
On Oct 2, 2015, at 8:31 PM, Michael Toppa notifications@github.com wrote:
And I resolved it by reworking the app structure a bit so all the class names are unique. Now my test suite is running fine. I am my own rubber duck.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub.
I've puzzled over this for a while, and can't figure it out. When I run a specific test file, my tests pass:
But when I do this, almost all the tests in all the test files fail:
Same thing with
rake teaspoon
. I'm using teaspoon-mocha 2.2.4. I'm not sure what info would be most useful to share, so instead of randomly pasting hundreds of lines of code here, if you have an idea where would be good to begin, I'll very happily do what I can to help sort this out. Thanks!