freelancing-god/combustion — Issue #16: Cucumber support
Author: nilclass
Created: 2012-02-07 11:11:36+00:00
State: open

There are a few things required to make Cucumber play nicely.
I'm using this issue to document the steps I had to take to make it work.
Maybe this will lead to a patch in the future :)

in env.rb
```ruby

Bundler.require :default, :development

$:.push(File.expand_path('../../../lib', __FILE__))
require 'my_engine'

## Capybara integration

World(Capybara::RSpecMatchers)
World(Capybara::DSL)

module RouteProxy
# didn't find a cleaner way to get route helpers into my steps
def method_missing(sym, *args)
if route_helpers.respond_to?(sym)
route_helpers.send(sym, *args)
else
super
end
end
end

World(RouteProxy)

Before do
MyEngine::Engine.routes.default_url_options[:host] = 'test.host'
end
```