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

  • Home
  • SEARCH
  • 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 7171335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:23:39+00:00 2026-05-28T15:23:39+00:00

I am writing an app where it is desirable to check if a view

  • 0

I am writing an app where it is desirable to check if a view does not have some functionality – in particular because that functionality must be presented only to users in certain security group. I am looking for the opposite of assert_selects in order to see that a menu is not rendered.

  • 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-28T15:23:40+00:00Added an answer on May 28, 2026 at 3:23 pm

    Take a look at the docs here:

    http://apidock.com/rails/ActionController/Assertions/SelectorAssertions/assert_select

    From the docs:

    assert_select is an assertion that selects elements and makes one or more equality tests.

    and from the equality tests sections:

    The equality test may be one of the following:

    true – Assertion is true if at least one element selected.

    false – Assertion is true if no element selected.

    String/Regexp – Assertion is true if the text value of at least one
    element matches the string or regular expression.

    Integer – Assertion is true if exactly that number of elements are
    selected.

    Range – Assertion is true if the number of selected elements fit the
    range.

    If no equality test specified, the assertion is true if at least one
    element selected.

    And a simple example:

       # Page contains no forms
       assert_select "form", false, "This page must contain no forms"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im writing c# app in VS2008 that will use some reports. My question: how
While writing an app, I encountered some odd behavior that I wasn't expecting and
Im writing an app that will display the register view depending if is first
I am writing an app that listens on a network connection, and when some
I am writing an app that ultimately wants to send some XML via email.
I am writing an app on GAE and I have a URL that will
I am writing an app that may have in its memory quite a bit
Writing an app which takes the preview frames from camera does some transformation to
I am writing app, that collects location data, based on GPS. And i have
I am writing an app that uses Highcharts, and in one instance I want

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.