Skip to content

Latest commit

 

History

History
47 lines (26 loc) · 1.33 KB

README.markdown

File metadata and controls

47 lines (26 loc) · 1.33 KB

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