Brian Takita
2006-Nov-09 18:38 UTC
[rspec-users] Focused Specs/Tests in Non-Textmate editors
Hello, I wrote a script that runs a focused spec/test from the filename and line number. I bound this to an external tool in my Idea environment. http://weblog.freeopinion.org/articles/2006/11/04/focused-unit-test-spec-script Brian -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rspec-users/attachments/20061109/6aa1b7f8/attachment.html
aslak hellesoy
2006-Nov-09 23:50 UTC
[rspec-users] Focused Specs/Tests in Non-Textmate editors
On 11/9/06, Brian Takita <brian.takita at gmail.com> wrote:> Hello, > > I wrote a script that runs a focused spec/test from the filename and line > number. > I bound this to an external tool in my Idea environment. > > http://weblog.freeopinion.org/articles/2006/11/04/focused-unit-test-spec-script >Very cool. I think we should add a -l --line option to the spec command to make this an inherent feature of RSpec. It would make tool integration much easier. I implemented similar functionality in RSpec.tmbundle (see my patch to Luke Redpath''s code - spec_mate.rb that I sent to the rspec-devel "Running specs with TextMate bundle" thread yesterday). Aslak> Brian > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users > >
aslak hellesoy
2006-Nov-09 23:58 UTC
[rspec-users] Focused Specs/Tests in Non-Textmate editors
On 11/10/06, aslak hellesoy <aslak.hellesoy at gmail.com> wrote:> On 11/9/06, Brian Takita <brian.takita at gmail.com> wrote: > > Hello, > > > > I wrote a script that runs a focused spec/test from the filename and line > > number. > > I bound this to an external tool in my Idea environment. > > > > http://weblog.freeopinion.org/articles/2006/11/04/focused-unit-test-spec-script > > >Another noteworthy piece of news is that it''s now much easier to launch RSpec from Ruby without having to spawn a new ruby via the spec command: # Facade to run specs without having to fork a new ruby process (using `spec ...`) # Runs specs. +argv+ is the commandline args as per the spec commandline API, +stderr+ # and +stdiout+ are the streams output will be written to, +exit+ tells whether or # not a system exit should be called after the specs are run and # +warn_if_no_files+ tells whether or not a warning (the help message) # should be printed to +stderr+ in case no files are specified. Spec::Runner::CommandLine.run(argv, stderr, stdout, exit, warn_if_no_files) So with a little more work in RSpec you could just call that, passing in --line as part of the args. Aslak> Very cool. I think we should add a -l --line option to the spec > command to make this an inherent feature of RSpec. It would make tool > integration much easier. I implemented similar functionality in > RSpec.tmbundle (see my patch to Luke Redpath''s code - spec_mate.rb > that I sent to the rspec-devel "Running specs with TextMate bundle" > thread yesterday). > > Aslak > > > Brian > > > > _______________________________________________ > > rspec-users mailing list > > rspec-users at rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > >