Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run jruby-tests in java? #2358

Closed
AlBundy33 opened this issue Dec 29, 2014 · 1 comment
Closed

How to run jruby-tests in java? #2358

AlBundy33 opened this issue Dec 29, 2014 · 1 comment

Comments

@AlBundy33
Copy link

require 'test/unit'
class SimpleTest < Test::Unit::TestCase
  def test_simple
    assert(false,"oh no....")
  end
end

If I run my rb-file on commandline with ruby.exe the TestCase is executed.
But if I run the script in java via JRubyEngineFactory().getScriptEngine() nothing happens.
Is there a way to automatically run the TestCase?

@kares
Copy link
Member

kares commented Jun 22, 2017

its an architectural problem of how test libraries work when you simply run a .rb file ...
they tend to load all tests and at_exit actually perform the run (test/unit, minitest do this).
thus you would need to initiate a teardown if you're expecting to run them (or trigger the run manually).

@kares kares closed this as completed Jun 22, 2017
@kares kares added this to the Invalid or Duplicate milestone Jun 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants