Ruby On Rails Classroom image

Neeraj  Amoli / Professional / Web Technology

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

Before running Spork, we can get a baseline for the testing overhead by timing our test suite as follows:

 

Here the test suite takes more than 7 seconds to run even though the actual tests run in under a tenth of a second. To speed this up, we can open a dedicated terminal window, navigate to the application root directory, and then start a Spork server:

 

(To eliminate the need to prefix the command with bundle exec, re-follow the steps in Section 3.6.1.) In another terminal window, we can now run our test suite with the --drb (‘‘distributed Ruby’’) option and verify that the environment-loading overhead is greatly reduced:

 

It’s inconvenient to have to include the --drb option every time we run rspec, so I recommend adding it to the .rspec file in the application’s root directory, as shown in Listing 3.37

 
 
 
image
Neeraj  Amoli

Skills    Ruby On Rails

Qualifications :-
Location :-Dehradun,Dehradun,Uttrakhand,India
Description:-

I have 3 year experience as a Software Engineer. My Skilled are Android Development (Java), ROR Development .   


Explore
 

  Students (0)