CSC/ECE 517 Fall 2012/ch1b 1w39 sn

From Expertiza_Wiki
Revision as of 04:53, 28 September 2012 by Npatowa (talk | contribs) (Created page with "<h2>Lecture 10 - Testing in Rails</h2> ==Setup test environment in Rails== Rails provides a basic boiler plate to create tests.There are three environments provided by Rails - p...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Lecture 10 - Testing in Rails

Setup test environment in Rails

Rails provides a basic boiler plate to create tests.There are three environments provided by Rails - production,development and testing.As the names suggest they are used for different purposes.This prevents developers from messing with their development environments.Inside the rails app directory there will be a directory called test.This directory contains folders-unit,functional,integration and fixtures.The unit folder holds tests for the models, the functional folder is meant to hold tests for your controllers, and the integration folder contains tests that involve any number of controllers interacting.Fixtures contain the sample test data.

Fixtures: