Practical Test Automation by Panos Matsinopoulos

Practical Test Automation by Panos Matsinopoulos

Author:Panos Matsinopoulos
Language: eng
Format: epub
ISBN: 9781484261415
Publisher: Apress


Randomized with seed 16834

$

As expected, the two examples that deal with the preparation duration fail. Before you fix them, see the messages that prove how the before(:all) hook works. It is called once for the whole context, and the instance variables created within its block are available to the code of the examples (Figure 5-3).

Figure 5-3Output of the RSpec Run Proves How the before(:all) Hook Works

Let’s quickly fix the code by introducing the #prepare_duration method in the Coffee class (file: coffee.rb – Listing 5-6).# File: coffee.rb

#

class Coffee

INGREDIENT_PRICES = {

'milk' => 0.2

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.