Ruby On Rails Classroom image

Pooja  Negi / Student / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3 | 4 | 5 | 6|Last
Lessons:- Test-driven Development

         Figure 3.6 A red (failing) test

 

the current Git branching strategy, shows work on the master branch instead the static-pages branch, but this is not cause for concern.)

           To get the test to pass, we’ll replace the default Home page test with the HTML in Listing 3.10

 

This arranges for a top-level heading (<h1>) with the content Sample App, which should get the test to pass. We also include an anchor tag a, which creates links to the given URI (called an ‘‘href,’’ or ‘‘hypertext reference,’’ in the context of an anchor tag):

<a  href=  "http://railstutorial.org/"  >Ruby on Rails Tutorial </a>

 

Now re-run the test to see the effect: 

$ bundle exec rspec spec/requests/static pages spec.rb

    

On my system, the passing test appears as in Figure 3.7. 

Based on the example for the Home page, you can probably guess the analogous test and application code for the Help page. We start by testing for the relevant content, in this case the string ’Help’ (Listing 3.11).

 

 

 
 
 
image
Pooja   Negi

Skills    Ruby On Rails

Qualifications :- High School - SSN high school, College/University - HNBGU, College/University - SRHU,
Location :-Ranipokhari,Rishikesh,Uttarakhand,India
Description:- Student
Explore
 

  Students (0)