Skip to content
Cucumber for Web Services
Find file
Failed to load latest commit information.
lib use better port finding logic Sep 28, 2011
spec more specs Sep 3, 2011
.gitignore add install toplevel Sep 3, 2011
Gemfile basic structure Sep 3, 2011
Gemfile.lock add spec stub Sep 3, 2011
LICENSE basic structure Sep 3, 2011 Edited via GitHub Sep 4, 2011
Rakefile basic structure Sep 3, 2011
antilles.gemspec basic structure Sep 3, 2011



Antilles forks a stub HTTP server using mimic and exposes a simple interface to configure the server. Antilles is meant to work with aruba to make it easier to test command line tools that communicate with Web APIs.

Read this blog post for our motivation.


Antilles works best with cucumber and aruba, but it can be used with any testing tool.

Install the gem:

  gem install antilles

or use bundler:

  group :test do
    gem :antilles

Set up environment, for example with cucumber:

  # features/support/antilles.rb
  require 'antilles/cucumber'

  Antilles.configure do |server|
    server.port = 9876   # defaults to 8080
    server.log = STDOUT  # defaults to nil for no logging

Requiring antilles/cucumber will automatically start a server before all Scenarios tagged @mimic, clear stubs between tests, and tear down the server when the test exits. Look at cucumber.rb if you need to customize this behavior.


Antilles can be configured to do anything mimic can do, but the basic mode of operation is to install stubs:

Given /^creating a membership fails with: (.*)$/ do |error|
  Antilles.install(:post, "/memberships/#{user}", {:status=>1, :explanation=>error}, :code=>409)
Something went wrong with that request. Please try again.