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.

Bug 137953 - Loadpath is not set for RSpec Test Runner
Summary: Loadpath is not set for RSpec Test Runner
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Testing (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-23 13:00 UTC by Martin Krauskopf
Modified: 2008-06-24 04:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2008-06-23 13:00:59 UTC
I'm not able to run simple following scenario:

  $ cd a_ruby_netbeans_project
  $ find -type f -name *sort*
  ./spec/sorting/sort_spec.rb
  ./lib/sorting/sort.rb
  $ head -1 spec/sorting/sort_spec.rb 
  require 'sorting/sort'

From CLI I run:
  $ ruby -Ilib spec/sorting/sort_spec.rb 
  $ # runs OK, i.e. finds sort.rb as expected

Running sort_spec.rb from NetBeans does not include classpath:

  FINE [org.netbeans.modules.ruby.platform.execution.ExecutionService]: Running:
     (basedir: /home/emdot/NetBeansProjects/RubyApplication17)
    "/space/ruby/ruby-current/bin/ruby
    -r/space/java/netbeans-hg/main/nbbuild/netbeans/ruby2/sync-stdio.rb
    /space/ruby/gem-repo/bin/spec --require
    /space/java/netbeans-hg/main/nbbuild/netbeans/ruby2/nb_rspec_mediator.rb
    --runner NbRspecMediator
    /home/emdot/NetBeansProjects/RubyApplication17/spec/sorting/sort_spec.rb"

And fails with:

/space/ruby/gem-tool/lib/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- sorting/sort
  (LoadError)
        from /space/ruby/gem-tool/lib/rubygems/custom_require.rb:27:in `require'
        from /home/emdot/NetBeansProjects/RubyApplication17/spec/sorting/sort_spec.rb:1
        from /space/ruby/gem-repo/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:14:in `load'
        from /space/ruby/gem-repo/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:14:in `load_files'
        from /space/ruby/gem-repo/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:13:in `each'
        from /space/ruby/gem-repo/gems/rspec-1.1.4/lib/spec/runner/example_group_runner.rb:13:in `load_files'
        from /space/ruby/gem-repo/gems/rspec-1.1.4/lib/spec/runner/options.rb:98:in `run_examples'
        from /space/ruby/gem-repo/gems/rspec-1.1.4/lib/spec/runner/command_line.rb:19:in `run'
        from /space/ruby/gem-repo/gems/rspec-1.1.4/bin/spec:4
        from /space/ruby/gem-repo/bin/spec:19:in `load'
        from /space/ruby/gem-repo/bin/spec:19

But which actually means that it is not related only to subfolder, but to all specs. Should I file separated issue. P1
or P2? Or it is the same one?
Comment 1 Erno Mononen 2008-06-23 13:17:03 UTC
Thanks for catching this - fixed: #d955ed910c80.
Comment 2 Quality Engineering 2008-06-24 04:26:12 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #278 build
Changeset: http://hg.netbeans.org/main/rev/d955ed910c80
User: Erno Mononen <emononen@netbeans.org>
Log: #137953: Loadpath is not set for Test Runner