Steps for TTD setup and execution


TDD setup and execution in Rails

Precious Info

1. On creating project tells Rails not to generate a test directory associated with the default Test::Unit framework. we will be using an alternate testing framework called RSpec to write a thorough test suite.

  rails new [project name] --skip-test-unit

2. Add Gems:
Add following gem in development mode so that we have access to RSpec-specific generators, and it includes it in test mode in order to run the tests. We don’t have to install RSpec itself because it is a dependency of rspec-rails and will thus be installed automatically:

  group :development, :test do
    .
    .
    gem 'rspec-rails', '2.11.0'
    .
    .
  end

Include the Capybara gem in test mode, which allows us to simulate a user’s interaction with the application using a natural English-like syntax.

  group :test do
    gem 'capybara', '1.1.2'
  end

To install and include the new gems, we run bundle update and bundle install

 bundle update bundle install…

View original post 166 more words

Advertisements

I am Senior Software Engineer. I love reading, writing, sharing,developing, hiking, movies, trips, mountains, brooks, hills etc.

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

StackOverFlow
Categories
Archives
%d bloggers like this: