Merb routing in Ruby on Rails. My fork adds rspec and Cucumber support.
Switch branches/tags
Nothing to show
Pull request Compare This branch is 8 commits ahead of hungrymachine:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
test
MIT-LICENSE
README.markdown
init.rb

README.markdown

MerbRouting

This plugin allows you to use Merb routing in a Ruby on Rails project.

See the announcement at HungryMachine

Compatibility

Ruby on Rails version 2.3.2 thanks to Piotr Sarnacki

Support for rspec-rails and Cucumber thanks to Bill Burcham

Integrating with Rspec-Rails

Put this in your Spec::Runner.configure block in spec_helper.rb

config.include ActionController::Routing::Helpers, Merb::Router::UrlHelpers

What Works

It looks like routing and URL generation work in running apps and in rspec specs. Both route_for and params_from work fine when called from rspec examples. So this will work (in a Rails project that includes this plugin):

script/generate rspec_scaffold Frooble name:string color:string description:text
rake db:migrate
rake spec

That's testing model, controller and routes.

Cucumber stories work too, so:

ruby script/generate feature Frooble name:string color:string description:text
rake features

Works.

Dependencies

Requires the rack-test gem:

sudo gem install rack-test

In environment.rb:

config.gem 'rack-test', :lib => 'rack/test'

License

MIT License