Generates dummy request URLs to hit Rails 3 applications' routes. Since POST and PUT requests require more information than an URL, it uses dummy to generate appropriate data for these requests.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Dummy routes

"Dummy urls" uses dummy to generate test urls for your Rails 3 application.


"Dummy urls" generates GET, POST, PUT and DELETE test urls for your Rails 3 application. It depends on dummy_data since it expects you to generate your test data with it (you can change it later). It also uses dummy to generate the needed data for POST and PUT requests. Check dummy's description for a better understanding of what it does.


$ gem install dummy_urls


Add the following to the Gemfile of your Rails 3 application: gem "dummy_urls"

Now you have access to the generator: rails generate dummy:urls

You can change the divisor in use (what these mean exactly is explained latter on): rails generate dummy:urls --divisor=3

Also, you can manually define the amount of urls to generate for each model (or just accept the defaults): rails generate dummy:urls --manual-amounts

And you can manually set the output folder of the dummy data (which defaults to test/dummy): rails generate dummy:urls --output-folder test/awesome_fixtures

The files will be placed under output-folder/urls.

Feel free to mix all of these options.

More information

URLs with smart data

"Dummy urls" tells dummy to try to understand your database columns and generate data accordingly, instead of dumping "Lorem ipsum" all over the place.

For instance, if you have a field called company_name, it will generate a company name. If you have a field called awesome_postal_code, it will generate a valid ZIP Code. If you have a field called longitude, it will generate a valid longitude, and so on. You get the picture.

Dummy cares about associations. It will create random associations between the automatically generated records, so you don't have to worry about that.

This way, the generated POST and PUT requests will look very realistic.

Smart amounts of urls

"Dummy urls" analyzes the amount of records that dummy_data generated and uses this amount to estimate the amount of url groups to generate (each group composed by a GET, a POST, a PUT and a DELETE request).

It uses the divisor for this estimation. If dummy_data generated 15 records for a given model and dummy_urls is using the default divisor (5), it will generate 3 groups of urls for this model (12 requests in total).

Copyright (c) 2010 Gonçalo Silva