This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | can't run current spec test | ||
---|---|---|---|
Product: | ruby | Reporter: | 64267598 <64267598> |
Component: | Testing | Assignee: | Erno Mononen <emononen> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | sustaining |
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | log ouput |
Description
64267598
2008-09-26 10:06:59 UTC
P5 is the lowest priority, P1 highest. I guess this is not P5. Choosing the middle -> P3. Erno will respond when he gets back from vacation. Seems to work for me with the latest build, could you please provide an example spec file where this does not work for you? Also, please paste here the exact build number of your IDE from Help -> About. Product Version: NetBeans IDE Dev (Build 200809150201) Edge rails and edge rspec. With rails, rspec gems same issue. It's not work with any spec. -------------------------------------------------- require File.dirname(__FILE__) + '/../spec_helper' class Example; end describe Example do it "should run example" do e = Example.new end end Might be an issue with edge Rails / edge rspec, I'll test with them. I've been trying to track this down. I'm confident its related to this: http://rubyforge.org/pipermail/rspec-users/2008-October/009734.html I has installed both Netbeans 6.1 and 6.5 (Build 200810170201) which use same platform - ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux]. Edge Rails, edge rspec. In Netbeans 6.1 it's work, in 6.5 doesn't work. Thanks for the pointer, Lenny. For the OP: Can you please turn on detailed logging (http://wiki.netbeans.org/FaqRubyNBLogging) and attach the log file here then? Created attachment 72876 [details]
log ouput
Thanks -- seems that in edge rspec they've removed a method we were using. I'll provide a fix soon. Here's a patch for <nb_install_dir>/ruby2/nb_rspec_mediator.rb diff -r 9363476c81c3 -r 426a47b55f6f ruby.testrunner/release/nb_rspec_mediator.rb --- a/ruby.testrunner/release/nb_rspec_mediator.rb Wed Oct 29 12:20:01 2008 +0100 +++ b/ruby.testrunner/release/nb_rspec_mediator.rb Thu Oct 30 09:38:00 2008 +0100 @@ -156,7 +156,7 @@ def spec_name_for(file, line_number) best_match.clear file = File.expand_path(file) - rspec_options.example_groups.each do |example_group| + safe_get_options.example_groups.each do |example_group| consider_example_groups_for_best_match example_group, file, line_number example_group.examples.each do |example| consider_example_for_best_match example, example_group, file, line_number @@ -175,4 +175,9 @@ end end + def safe_get_options + # there's no 'rspec_options' method in rspec 1.1.11 + respond_to?(:rspec_options, true) ? rspec_options : Spec::Runner.options + end + end This should fix it for RSpec edge / MRI, for JRuby it still doesn't work due to the issue Lenny pointed out. I will push the patch soon, there will be an automatic notification here when it has been integrated. Unfortunately it is too late for 6.5, but if you can verify that the fix works, we can include it in the first patch for 6.5. Well. It work. Thanks. It's very bad if this issue will be in 6.5 :( > It's very bad if this issue will be in 6.5 :( I know, but on the other hand currently it affects only people using edge rspec, and the first patch for 6.5 should be available quite soon after the release. Meanwhile one can use the patch I posted or a 7.0 dev build. Can you mark the issue as verified since it works for you now (we have a policy that only verified issues can be included in patches)? I've pushed this to the main repo, http://hg.netbeans.org/main/rev/f161defcb28a, so marking as fixed. Integrated into 'main-golden', will be available in build *200810301401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/f161defcb28a User: Erno Mononen <emononen@netbeans.org> Log: #148462: can't run current spec test Patch make this functional working. Since this issue is P3 priority, in accord with rules "How to include issues into patch" (http://wiki.netbeans.org/NetBeansPatches) it must include an explanation as to why its backport is necessary and how safe it is. Could you please provide such explantion? Since this issue is P3 priority, in accord with rules "How to include issues into patch" (http://wiki.netbeans.org/NetBeansPatches) it must include an explanation as to why its backport is necessary and how safe it is. Could you please provide such explanation? The fix is reasonably safe, it just checks whether a certain method present in the current development version of RSpec exists (and uses that method if it does exist). The reason to backport is that when a new version RSpec is released (which will very likely happen in 6.5 timeframe) people will upgrade RSpec and without the fix they wouldn't be able to run the current test from the IDE. The fix has been ported into the release65_fixes repository. http://hg.netbeans.org/release65_fixes/rev/c0478d9bd8b2 Verified by QE in Nb65Patch1 build. The status whiteboard has been changed to 65fixes1-verified based on the comment above. |