Closed davetron5000 closed 9 years ago
OK, nevermind. Turns out that you don't need to require jasmine again—somehow it's being brought in by teaspoon. And if you do require it again, everything just silently fails.
My recommendation is to use JavaScript and its ecosystem for every possible software task, because this behavior (which I blame on asset pipeline and/or jasmin—not teaspoon) is the sort of thing that'll keep us employed for decades.
Sorry for the bother.
No bother. I like being employed :)
Teaspoon requires the framework libraries to provide a consistent experience for people at any level. For the conventional cases, Teaspoon requiring the framework makes it easier to get started, makes Teaspoon core simpler and more performant, and fails faster when things are misconfigured. I agree it would be more transparent if they were required from spec_helper, though.
:beers:
Yeah, I think that call makes sense, and I have no reason for including it (again)—the instructions don't say to.
I guess it would've been nice if Jasmine had detected this and realized it was blowing away all the global state it sets up and warn me, but we can't have it all :)
See https://github.com/davetron5000/jasmine-test
Basically:
teaspoon
andbower-rails
toGemfile
jasmine '1.3.1'
toBowerfile
bundle install && rake bower:install
rails g teaspoon:install
jasmine/lib/jasmine-core/jasmine
tospec/javascripts/spec_helper.js
spec/javascripts/dummy_spec.js
rake teaspoon
This definitely loads all of my files, but doesn't run any tests. 0 examples, 0 failures.
Now, if I load it up in the browser, it doesn't even load
spec/javascripts/spec_helper.js
at all. It somehow detects thatspec/javascripts/dummy_spec.js
exists, but doesn't run any tests.I've added
console.log
andthrow 'wtf';
in various places to prove what is/isn't being loaded.Any ideas? I can't even figure out how to debug this. Is there some way to tell teaspoon to print debug messages about what it's doing?