-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use rails/spring when available #72
Comments
Please try https://github.com/die-antwort/rspec-tmbundle/tree/use-binstub-if-present and see if it works for you. If yes, I’ll make it into a PR. |
I checked it out, switched to use-binstub-if-present branch, replaced my RSpec.tmbundle with it, reloaded TextMate, and tried running my spec file a few times. Each of 3 runs took 8 seconds (this project has a ton of gems) before the window appeared. Running in console with I guess that means it didn't work. |
Scratch that. I moved the old one to RSpec.old.tmbundle and I should have deleted it. Removing that one and just using yours fixed it. Hooray! Definitely submit this one. On a side note, it still takes about 1.5 sec for the window to pop up. I remember in TextMate 1, the window would appear with a spinner immediately after sending the command. Might something similar be possible in this case? Sometimes I hit the command, and then I'm not sure I actually hit it because I don't see the window, so I hit it again, and a few seconds later I have 2 competing windows both running at the same time. If this is a hassle, no worries. Your current solution is fantastic for anyone using Spring. |
Hm. The relevant code is in |
Sorry guess you still only saw my first message. I'll debug it a bit and post back here in a few minutes. |
For clarification, the successful run was using RSpec 2.14.1 with Spring. The unsuccessful with RSpec 3.0.3 without Spring. |
Seems like an exception happens in |
In |
::RSpec is defined, ::RSpec::Core is not defined. |
Here's a better clue: If I insert |
Thanks, I screwed up the conditionals when adding binstub support. I just updated https://github.com/jonleighton/spring-commands-rspec with a fix. |
Do you mean this? die-antwort@d25204d I just pulled and things look good. |
Yes of course, seems I copied the wrong link … time to go to bed, I suppose 😴 As said, I’ll prepare a PR for this soon. |
Just checked out your fix-run-focussed-for-rspec3 branch as well and it works great! Hopefully you get all of these things out soon. In the meantime I’ve got a local merge of them and I’m very pleased and very grateful to you. Great job! Glenn On Jul 26, 2014, at 8:31 PM, Stefan Daschek notifications@github.com wrote:
|
Another thought: “Save Example file and remember” looks unbound, but it’s one of the only features about RubyMine that I feel is really nice. I changed my local behavior to automatically save the file whenever I run a spec file or a focused spec, and then bound the “Run Last Examples file” to ctrl+cmd+r. I also changed the “scope selector” of the bundle command to *. With that, I have a “retry” button from any file for whatever the last spec was that I ran from any file. Super handy! I can keep coding and changing and retrying as I go without actually needing to go back to the spec file. Do you think this would make for good default behavior? I can almost submit a pull request, but I’m a bit stumped on the part where it saves the file, and I’d rather it save the file and the line number if it was run as a focused file. I’d have to write the relevant options to the file and not just the file name, and my first thought would be to store it as with .to_json and pull it out with JSON.parse, but the json library isn’t available in this context. Is there already a convention I should be using for this? Thanks! On Jul 26, 2014, at 8:31 PM, Stefan Daschek notifications@github.com wrote:
|
PR for using binstubs: #75 |
Closed with #75 :) |
Spring (https://github.com/rails/spring) now comes default with Rails projects and with https://github.com/jonleighton/spring-commands-rspec you can now run bin/rspec spec/models/blah_spec.rb to very quickly run specs. It would be great if TextMate could take advantage of this.
The text was updated successfully, but these errors were encountered: