Red - example 2

As mentioned in the preceding section, we need another test because the production code we have written to make the previous test pass only works for one specific headline. But the feature we want to implement has to work for all possible headlines. Add the following test to FirstDemoTests:

func test_MakeHeadline_ReturnsStringWithEachWordStartCapital2() { 
  let string = "Here is another Example" 
   

  let headline = viewController.makeHeadline(from: string) 
   

  XCTAssertEqual(headline, "Here Is Another Example") 
} 

Run the test. This new test obviously fails. Let's make the tests green.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.182.107