Skip to content
royw edited this page Aug 11, 2012 · 1 revision

Start by adding cucumber to your Gemfile and running "bundle install":

group :development do
  gem 'cucumber'
end

Then create the feature directory and it's support directory:

mkdir -p features/support
touch features/support/env.rb

The env.rb file tells cucumber we are using ruby.

Add the following to the Rakefile:

require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features)

Using the spec_helper.rb as our example, we can setup cucumber similarly by adding the following to features/support/env.rb:

require "rubygems"
require "bundler/setup"
require "rack"     # must be after bundler/setup
require "rack/test"
require "rspec"
require 'json'

# bring in your ramaze app
require_relative('../../app')

Ramaze.setup_dependencies
Ramaze::Log.level = Logger::ERROR

def app
  Rack::Lint.new(Ramaze.middleware)
end

World(Rack::Test::Methods)
Clone this wiki locally