You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jake Farrell (Closed) (JIRA)" <ji...@apache.org> on 2011/11/10 01:55:51 UTC

[jira] [Closed] (THRIFT-1424) Ruby specs fail when run with rake

     [ https://issues.apache.org/jira/browse/THRIFT-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1424.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.8
         Assignee: Peter Sanford

Committed, thanks for the patch
                
> Ruby specs fail when run with rake
> ----------------------------------
>
>                 Key: THRIFT-1424
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1424
>             Project: Thrift
>          Issue Type: Bug
>          Components: Ruby - Library
>    Affects Versions: 0.8
>            Reporter: Peter Sanford
>            Assignee: Peter Sanford
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: 0001-Update-relative-spec-require-lines.patch
>
>
> If I run rake in the rb directory the specs fail to load the spec_helper:  
> {code}
> spec/serializer_spec.rb:23:in `require': no such file to load -- spec/spec_helper (LoadError)
>         from spec/serializer_spec.rb:23:in `<top (required)>'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `load'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:15:in `block in load_files'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `each'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/example_group_runner.rb:14:in `load_files'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/options.rb:134:in `run_examples'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/lib/spec/runner/command_line.rb:9:in `run'
>         from /home/psanford/.rvm/gems/ruby-1.9.2-p180@thrift/gems/rspec-1.3.2/bin/spec:5:in `<main>'
> rake aborted!
> {code}
> If I cd into the spec dir and run 'spec *spec.rb' everything works. 
> The problem is all the spec files require the spec_helper via:
> {code}
> require File.dirname(__FILE__) + '/spec_helper'
> {code}
> This will expand the dirname relative to where ruby was invoked. Changing this to:
> {code}
> require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
> {code}
> will fix this issue. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira