jejacks0n / teaspoon

Teaspoon: Javascript test runner for Rails. Use Selenium, BrowserStack, or PhantomJS.
1.43k stars 243 forks source link

"fdescribe" works but "fit" doesn't #415

Closed thbar closed 9 years ago

thbar commented 9 years ago

First, thanks for your great gem, which I'm happily using for my app!

A couple of days ago I migrated from jasmine 1.3.0 to 2.2.0 (this is great to have this bundled in teaspoon with a way to pick the version, btw!), in hope to start using focused specs.

It works for fdescribe, but using fit in standalone fashion won't work apparently (I get 0 specs out).

I tracked the issue a bit and it /looks/ like this may be very close to this issue on another project, where the culprit ultimately was jasmine-reporters (which teaspoon doesn't use, if I read correctly).

Maybe there is a similar interaction with the reporter system in use inside teaspoon?

I'm not blocked by this but wanted to report it anyway.

jejacks0n commented 9 years ago

That's useful to know.. does the normal focus behavior of Teaspoon work correctly? The funny thing is, I didn't know this was a thing until just now, but it seems like support should be added for it.

thbar commented 9 years ago

Hi!

does the normal focus behavior of Teaspoon work correctly?

I didn't know Teaspoon supported some sort of focus, so I looked at the readme. Do you mean this?

If so I just tested and indeed it works.

The funny thing is, I didn't know this was a thing until just now, but it seems like support should be added for it.

I'm using RSpec a lot together with Guard (automatic spec running), and there focus: true is very nice to focus without leaving the editor (I just keep my Guard / RSpec output on half of the screen).

For Teaspoon I also use Guard, so being able to just save a file with fit in it would indeed be very convenient.

Again, not a blocker, but maybe something to add at some point!

mikepack commented 9 years ago

Thanks for submitting this issue, Thibaut! It should be fixed in this commit. Unlike Mocha, when focusing a spec in Jasmine, it does not also run the suite (ie surrounding describe). The Teaspoon code was assuming every spec has a suite. Can you point your Gemfile at master and see if everything has been fixed?

thbar commented 9 years ago

@mikepack I just tested against e5e54a5f91876d13558d4d94fd82c53d9b50ed88 and both fit and fdescribe worked as expected. Thanks for the fix!

mikepack commented 9 years ago

@thbar 🍻 thanks for checking. Have a great weekend!