Ruby On Rails Classroom image

Neha  Jaggi / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3 | 4|
Lessons:- Speeding up Tests with Spork

One word of advice when using Spork: After changing a file included in the prefork loading (such as routes.rb), you will have to restart the Spork server to load the new Rails environment. If your tests are failing when you think they should be passing, quit the Spork server with Control-C and restart it:

 

Guard with Spork
Spork is especially useful when used with Guard, which we can arrange as follows: 

$ bundle exec guard init spork

              

We then need to change the Guardfile as in Listing 3.38. 

 

Note that we’ve updated the arguments to guard to include :cli => --drb, which ensures that Guard uses the command-line interface (cli) to the Spork server. We’ve also added a command to watch the spec/support/ directory, which we’ll start modifying in Chapter 5.  

            With that configuration in place, we can start Guard and Spork at the same time with the guard command

$ bundle exec guard

                      Guard automatically starts a Spork server, dramatically reducing the overhead each time a test gets run. A well-configured testing environment with Guard, Spork, and (optionally) test notifications makes test-driven development positively addictive. See the Rails Tutorial screencasts18 for more information.

 
 
 
image
Neha  Jaggi

Skills    Ruby On Rails

Qualifications :- High School - , College/University - Graphic Era Hill University, Dehradun, College/University - ,
Location :-Dehradun,Dehradun,UTTARAKHAND,India
Description:-

Experienced Software Developer with a demonstrated history of working in the Information Technology and services industry. Skilled in Web Technologies (Ruby on Rails, PostgreSQL, php, Laravel and AJAX). 


Explore
 

  Students (0)