Ooops. I meant the -l option not -n. It seems that ''-l'' command line option for rspec stopped working as of rspec 1.1.3. I think this may be related to why I can''t get NetBeans to run focussed specs anymore. Does this work for others? I''m using jruby but I don''t think that''s the issue. http://ruby.netbeans.org/issues/show_bug.cgi?id=148462 -lenny
On Tue, Oct 28, 2008 at 2:31 PM, Lenny Marks <lenny at aps.org> wrote:> Ooops. I meant the -l option not -n. > > It seems that ''-l'' command line option for rspec stopped working as of rspec > 1.1.3. I think this may be related to why I can''t get NetBeans to run > focussed specs anymore. Does this work for others? I''m using jruby but I > don''t think that''s the issue. > > http://ruby.netbeans.org/issues/show_bug.cgi?id=148462I think 1.1.3 was the release that introduced nested example groups, so it would make sense that the -l option fell apart. Please check http://rspec.lighthouseapp.com and see if there is already a bug report and add one if not. Thx> > -lenny > > _______________________________________________ > rspec-users mailing list > rspec-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/rspec-users >
On Tue, Oct 28, 2008 at 12:31 PM, Lenny Marks <lenny at aps.org> wrote:> Ooops. I meant the -l option not -n. > > It seems that ''-l'' command line option for rspec stopped working as of > rspec 1.1.3.It''s been working for me. I wrote a Vim script that runs the current spec (in whatever window it might be) with DRb, so it takes about a second. It''s made a big difference in my TDD/BDD work cycle. ///ark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081028/23d601a7/attachment-0001.html>
On Tue, Oct 28, 2008 at 1:54 PM, Mark Wilden <mark at mwilden.com> wrote:> On Tue, Oct 28, 2008 at 12:31 PM, Lenny Marks <lenny at aps.org> wrote: > >> Ooops. I meant the -l option not -n. >> >> It seems that ''-l'' command line option for rspec stopped working as of >> rspec 1.1.3. > > > It''s been working for me. I wrote a Vim script that runs the current spec > (in whatever window it might be) with DRb, so it takes about a second. It''s > made a big difference in my TDD/BDD work cycle. >Come to think of it, I had to change the command it runs from ''script/spec'' to ''spec'' with the latest release of RSpec. ///ark -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081028/da8da5fc/attachment.html>
> On Tue, Oct 28, 2008 at 12:31 PM, Lenny Marks <lenny at aps.org> > wrote: > > > Ooops. I meant the -l option not -n. > > > > It seems that ''-l'' command line option for rspec stopped working > as of > > rspec 1.1.3. > > > It''s been working for me. I wrote a Vim script that runs the current > spec > (in whatever window it might be) with DRb, so it takes about a > second. It''s > made a big difference in my TDD/BDD work cycle. > > ///arkSorry for not replying to the thread but I''m not getting any mail from rspec-users right now for whatever reason. It looks like it is an issue specific to jruby. With rspec-1.1.11 and jruby-1.4 #linenumber_spec.rb describe "line number" do it "should be example one" do true.should be_true end it "should be another example" do true.should be_true end end > jruby-1.1.4/bin/jruby $GEM_HOME/bin/spec -l 2 $HOME/tmp/ linenumber_spec.rb Finished in 0.013457 seconds 0 examples, 0 failures > ruby $GEM_HOME/bin/spec -l 2 $HOME/tmp/linenumber_spec.rb . Finished in 0.006864 seconds 1 example, 0 failures -lenny
> Sorry for not replying to the thread but I''m not getting any mail from > rspec-users right now for whatever reason. > > It looks like it is an issue specific to jruby. > > With rspec-1.1.11 and jruby-1.4 > > #linenumber_spec.rb > describe "line number" do > it "should be example one" do > true.should be_true > end > it "should be another example" do > true.should be_true > end > endI''m not familiar enough with the rspec code to get to the bottom of this, but I did enough drilling to find its related to the new backtrace based strategy for Spec::Runner::SpecParser#spec_name_for(file, line_number). Putting a print statement inside Spec::Example::ExampleGroupMethods#registration_backtrace I get the following which shows that the target spec file isn''t even in the backtrace from jruby. def registration_backtrace backtrace = eval("caller", @registration_binding_block) puts "backtrace: #{backtrace.join("\n")}" backtrace end > ruby $GEM_HOME/bin/spec -l 2 $HOME/tmp/linenumber_spec.rb backtrace: /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/ example/example_group_methods.rb:27:in `initialize'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/extensions/ class.rb:9:in `new'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/extensions/ class.rb:9:in `subclass'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/example/ example_group_methods.rb:66:in `create_nested_example_group'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/example/ example_group_methods.rb:53:in `describe'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/example/ example_group_factory.rb:53:in `create_example_group'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/extensions/ main.rb:27:in `describe'' /home/jis/compsvc/lenny/tmp/linenumber_spec.rb:1 /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ example_group_runner.rb:14:in `load'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ example_group_runner.rb:14:in `load_files'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ example_group_runner.rb:13:in `each'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ example_group_runner.rb:13:in `load_files'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ options.rb:98:in `run_examples'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ command_line.rb:10:in `run'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/bin/spec:4 /Users/Shared/RubyGems/1.8/bin/spec:19:in `load'' /Users/Shared/RubyGems/1.8/bin/spec:19 > jruby-1.1.4/bin/jruby $GEM_HOME/bin/spec -l 2 $HOME/tmp/ linenumber_spec.rb backtrace: /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/ extensions/class.rb:9:in `eval'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/example/ example_group_methods.rb:203:in `registration_backtrace'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ spec_parser.rb:35:in `consider_example_groups_for_best_match'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ spec_parser.rb:15:in `spec_name_for'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ spec_parser.rb:14:in `each'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ spec_parser.rb:14:in `spec_name_for'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ options.rb:302:in `set_spec_from_line_number'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ options.rb:114:in `run_examples'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/lib/spec/runner/ command_line.rb:10:in `run'' /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/bin/spec:4 /Users/Shared/RubyGems/1.8/gems/rspec-1.1.11/bin/spec:19:in `load'' /Users/Shared/RubyGems/1.8/bin/spec:19
On Oct 28, 2008, at 5:46 PM, Lenny Marks wrote:>> > I''m not familiar enough with the rspec code to get to the bottom of > this, but I did enough drilling to find its related to the new > backtrace based strategy for Spec::Runner::SpecParser#spec_name_for > (file, line_number). Putting a print statement inside > Spec::Example::ExampleGroupMethods#registration_backtrace I get the > following which shows that the target spec file isn''t even in the > backtrace from jruby. > > ...I submitted a JRuby issue about this but it sounds like it might be more of an rspec problem. See the issue comments. Thanks, -lenny
> On Oct 28, 2008, at 5:46 PM, Lenny Marks wrote: > >>> >> I''m not familiar enough with the rspec code to get to the bottom >> of this, but I did enough drilling to find its related to the new >> backtrace based strategy for Spec::Runner::SpecParser#spec_name_for >> (file, line_number). Putting a print statement inside >> Spec::Example::ExampleGroupMethods#registration_backtrace I get >> the following which shows that the target spec file isn''t even in >> the backtrace from jruby. >> >> ... > > > I submitted a JRuby issue about this but it sounds like it might be > more of an rspec problem. See the issue comments. >The link would probably help. http://jira.codehaus.org/browse/JRUBY-3092 Sorry again for not replying directly to the messages on this thread (been pasting from the archives) but I''m still not getting mail from rspec-users. Is there something going on with that? If nobody else is experiencing problems I''ll assume its on my side. Anyway, I just saw David''s reply to check in lighthouse and I did find an open ticket. I commented on it to link to all of this. http://rspec.lighthouseapp.com/projects/5645/tickets/528-focused- specs-not-working-when-using-jruby Thanks, -lenny