Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4085710
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:37:06+00:00 2026-05-20T18:37:06+00:00

I am at the end of chapter five doing the exercises. I am supposed

  • 0

I am at the end of chapter five doing the exercises. I am supposed to be testing that the links go to the correct pages. Here is my test code.

require 'spec_helper'

describe "LayoutLinks" do

    it "should have the right links on the layout" do
        visit root_path
        click_link "About"
        response.should have_selector('title', :content => "About")
        click_link "Home"
        response.should have_selector('title', :content => "Home")
        click_link "Help"
        response.should have_selector('title', :content => "Help")
        click_link "Contact"
        response.should have_selector('title', :content => "Contact")
        click_link "Sign up now!"
        response.should have_selector('title', :content => "Sign up")
        end
        end

Everything passes except for the last test. It says that it can not find a link with the text “Sign up now!” . I know that the page does have a “Sign up now!” link. I thought that maybe it rendered differently in the source code, but when I look at the source code it looks normal <a href="/signup" class="signup_button round">Sign up now!</a> . From my understanding, it is supposed to click on the links and then test if the title matches the :content symbol. Am I misunderstanding something?

here is the error I am getting:

Failures:

  1) LayoutLinks should have the right links on the layout
     Failure/Error: click_link "Sign up now!"
     Webrat::NotFoundError:
       Could not find link with text or title or id "Sign up now!"
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:37:07+00:00Added an answer on May 20, 2026 at 6:37 pm

    I believe the problem is that the “Sign up now!” link is in fact not on all pages, and this test actually navigates the pages.

    At least in the version of this tutorial that I ran through some time ago, that link was only on the home page.

    If you add a visit root_path just before that last click_link it’ll likely work.

    A better test would have that check in an independent test related specifically to the home page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing some programming exercises at the end of chapter four in Introduction to
RoR newbie here. Working the play time exercises at the end of Agile Web
I'm trying to do the exercises at the end of chapter 9 from Bjarne
I'm doing something slightly unorthodox here, in that I'm just populating the database via
I'm doing the chapter exercises of Agile Web Development with Rails. It's a store
I am reading the APUE, Chapter 10. Here is my code. #include apue.h #include
Back-end: I have a model (User) that has_many of another model (ContactPreference). Front-end: An
My end objective is to create an applescript that intelligently inserts a bullet point
Toward the end of Chapter 16 of the C++ Primer I encountered the following
I've completed the Graham's exercise Chapter 5.8,and my code is: (defun max-min (vec &key

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.