dmanaster / rails-routing-lab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started

  • Pull down this repo
  • $bundle install
  • $rake test
  • You should see failing tests
  • The test file is located at 'test/integration/routes_test_test.rb'

Your Task:

  • Write all the neccessary routes to make the tests pass!

Example:

You can make the first test pass at least two ways:

  resources :photos

OR

  get '/photos/:id' => 'photos#show'

Note:

We are no longer using fis/test. This is your first intro to Test::Unit and MiniTest, the default testing libraries for rails.

One major difference is that there are new assertions, below are some links to introduce you to them.

Test::Unit

MiniTest

We are using assert_generate.

assert_generate takes a path and a route(as a hash) and tries to match them up

Also, Tests are run in a random order so pay attention to the names of the tests to find them in the test run

About


Languages

Language:Ruby 96.6%Language:JavaScript 3.4%