buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BUILDR-29) Run RSpec specs with JRuby
Date Wed, 30 Jan 2008 00:44:34 GMT

    [ https://issues.apache.org/jira/browse/BUILDR-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12563759#action_12563759
] 

Assaf Arkin commented on BUILDR-29:
-----------------------------------

Right about defined?, I confused it with const_defined?, my mistake.

For running JRuby from MRI, I'm thinking the following:

1.  If JRuby is installed, locate it either from PATH or JRUBY_HOME (generally from PATH,
but JRUBY_HOME would be useful when using two versions, or testing against new releases)

2.  If JRuby is not installed, we can download and install it.  I wonder how many people will
attempt to use RSpec without also using JRuby already, so probably not a first priority.

3.  If JRuby not installed, provide a clear error message for why JRuby is necessary (documentation
covers installation in more details).

4.  It is possible that JRuby will not include RSpec, or that it will include a version different
from the one we test Buildr with, so three options:
  4.1  Complain, ask to 'jruby gem install rspec' and exit.
  4.2  Gem install into JRuby on the first run.
  4.3  Require the MRI Gem for use with JRuby.

> Run RSpec specs with JRuby
> --------------------------
>
>                 Key: BUILDR-29
>                 URL: https://issues.apache.org/jira/browse/BUILDR-29
>             Project: Buildr
>          Issue Type: New Feature
>          Components: Test frameworks
>    Affects Versions: 1.3
>            Reporter: Nick Sieger
>             Fix For: 1.3
>
>         Attachments: buildr_framework.rb
>
>
> Attached is a test framework I wrote that allows me to write RSpec specs that test Java
code.
> If Buildr is run under MRI, JRuby is downloaded as a dependency and launched to run the
specs.
> If Buildr is run under JRuby, JRuby will launch a sub-vm of itself, including the project
classpath but using the same JRuby version that was used to launch Buildr.
> Note the following features and/or limitations:
> * No specs for this currently exist; they'll need to be written if you want the coverage.
I probably won't write them (for now) :)
> * Assumes project specs are in the "spec" directory. You may want this to be customized.
> * Runs specs in "specdoc" mode (hard-coded). Choosing a formatter would be another possible
customization.
> * Allows a {{SPEC}} environment variable to be set or passed on the command-line to specifiy
a single spec to run (just like the RSpec rake task)
> * Allows {{:required_gems}} as an option to be passed to the "test" clause of the project,
which will ensure that gems are present before running (installing them if necessary) before
running specs. There is currently no way to specify gem version.
> * Uses ci_reporter to generate JUnit-like XML reports; assumes that they may be useful
(perhaps in conjunction with the junit:report task); but it's not strictly necessary.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message