Skip to content

pal/cucumber_java

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Have a Cuke, Duke

Cucumber-Java lets you write Cucumber steps in pure Java. Example:

public class StuffSteps {
    @Given("I have (\\d+) (.*) cukes")
    public void iHaveNCukes(String n, String color) {
        this.cukes.put(color, n);
    }
}

Cucumber-Java also brings you first-class Maven support.

Building the cucumber-java gem

This is for hackers. If you just want to use Cucumber with Java, head straight to
the examples.

Install Maven

You can grab it here

Install JRuby

You can grab it here
Make sure you get 1.2.0 or later.

Install Hoe

This gem is needed to build the Cucumber Java gem

jruby -S gem install hoe --no-rdoc --no-ri

Build and install the gem

jruby -S rake gem
jruby -S gem install pkg/cucumber-java --no-rdoc --no-ri

In case you use Windows (Cygwin/MSYS) it’s easier to do the :jar task manually mvn clean install && mv target/*.jar /lib. In that case comment out task :gem => :jar at the bottom of the Rakefile

Now head to the simple example and run it. It serves well as a testbed. Or simply mvn clean install -Pexamples

In case you do not have the gems installed already, try mvn clean install -Pexamples -Dcucumber.installGems=true

About

Cucumber packaged in a Jar file with pure Java support.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors