Closed hwayne closed 8 years ago
Some notes on the implementation that may or may not be acceptable:
spec/javascripts
, it will strip that out. That was added so that you could use bash tab completion.spec
currently only works with full file paths, not directories. It also doesn't support line scoping.Thanks for taking a look at this feature. This looks pretty good for a first pass. I would like to see a couple of updates before we merge.
Also, I'm a bit concerned about having both test_files
and spec_files
attributes on the Config
object as it could lead to confusion about which is which. It might make sense to find a better name for the combined list (helpers and specs) and just plumb that name change through.
Wow, hugely sorry for how long that took to update. Made both changes as requested. Wrt the spec_files
versus test_files
, what about changing spec_files
to all_loaded_files
? That makes it clear it's everything. Happy to add that in if you want to make that change.
That sounds good. Let's go with all_loaded_files
for now. Thanks
Quick question before pushing: Do you think having all_loaded_files
would confuse people, given it doesn't include src_files
and css_files
?
Hmmm, maybe testing_files
or something.
So I tried making the change, but I ran into a problem with this line. I think the variable name and the symbol should be the same for consistency's sake, but as far as I can tell the symbol determines the name of the directory jasmine looks in. I think any refactoring I could do around this would be fairly complex and it might be worth talking that through in its own diff. What are your thoughts?
For now, let's just stop there and leave the symbol so the urls are still /spec
but pass in all of the testing_files
Got it passing!
At my company we had so many jasmine specs that they'd take 20+ seconds to load before the test runner even started. For our recent hackathon I sketched up
spec
option, so you can dorake jasmine:ci spec=foo/bar/blat_spec.js
to only load and run the specs you want to. This has made it a lot easier for us to BDD with jasmine, since instead of running a few thousand specs in a minute we just do six in a few seconds.I checked the gem and saw issue #234 and figured it'd be good to throw this up as a PR. I don't think it's master-ready yet - it is a hackathon project, after all. But it might make a good launching point for developing the feature. Let's chat revisions!