RSpec (or Jasmine/Mocha) style tests for native Java 8
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



RSpec (or Jasmine/Mocha) style tests for native Java 8, a bit like the following:

public class MinimalSpec implements Specification {
    public SpecificationNode root() {
        return describe("This specification",
            it("contains a statement with a test", () -> assertTrue(true))


Allows for more expressive test names without very_long_underscore_ridden_test_method_names, and for more flexible test structure. Java 8 features such as lambda expressions make this possible with less boilerplate. See wiki/Motivation for more.


  1. Add JarSpec to your project dependencies. See below for Maven and the dependency info page for other build tools.

  2. Start writing specs! See wiki/Implementing Specifications for more details, or the project's own tests for examples.

Using Maven Maven Central

Add the dependency to your pom:


Configure SureFire to pick up classes named *Spec (although you can stick with the default *Test convention if you prefer):



The current release on Maven Central is stable. See open milestones for further planned features. Releases numbers follow the Semantic Versioning specification for backwards compatibility.

Developer resources: Test results Build status Coverage report Coverage Status Task board