Skip to content

Instantly share code, notes, and snippets.

@sam
Created September 12, 2012 17:10
Show Gist options
  • Save sam/3708231 to your computer and use it in GitHub Desktop.
Save sam/3708231 to your computer and use it in GitHub Desktop.
Simplest possible JRuby+Java test
package org.foo;
public class Bar {
public static int baz() {
return 1;
}
}
#!/usr/bin/env jruby
require "minitest/autorun"
describe org.foo.Bar do
describe "baz" do
it "must return 1" do
org.foo.Bar.baz.must_equal 1
end
end
end
@sam
Copy link
Author

sam commented Sep 12, 2012

As an example of the above mention of direct execution, you can:

  1. Clone this project: https://github.com/sam/blog
  2. ./install-dependencies
  3. bundle install
  4. test/watch.rb

Which is basically the setup I mention above, except using Maven instead of Ant to compile. (Only because I assume using a non-Maven source tree structure, and custom build-dir would be a little simpler with Ant?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment