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 994937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:38:41+00:00 2026-05-16T06:38:41+00:00

Are there strong reasons for using Rspec for controllers and views too? My views

  • 0

Are there strong reasons for using Rspec for controllers and views too?

My views are heavily dependent on Javascript, and as far as I know, Rspec doesn’t handle javascript/ajax on views. Also im using Cucumber + Selenium for that.

And should I use it for controllers?

Isn’t it enough to just use Cucumber + Selenium for the application behavior? Cause if a cucumber test passes, then it passes, why should I bother with Rspec view and controller tests?

Could someone enlighten me on this topic?

  • 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-16T06:38:42+00:00Added an answer on May 16, 2026 at 6:38 am

    I use a combination of Cucumber + Shoulda, but what I’m about to tell you still applies to the setup you have.

    When testing a controller I use Shoulda in a functional test to hit all of my “negative auth” situations. For example:

    • A logged in user trying to access an admin page.
    • A logged out user trying to access protected content.
    • User A trying to delete User B’s post.

    I use Shoulda for this, because what I’m generally looking for is that I was kicked to the login page, and that whatever model was trying to be accessed maliciously wasn’t actually changed. I could use Cucumber for this, but I find it easier and less cumbersome to do with a handful of Shoulda macros and some functional tests. Shoulda contexts are a great fit here.

    Then for the “good auth” situations, I use Cucumber. Things like:

    • A user accessing his own preferences page.
    • An admin pulling up reports.

    These types of tests require that I check some actual page content, and not just check for “access denied” over and over again. I find the descriptiveness of Cucumber to be a great match here.

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

Sidebar

Related Questions

Is there any real difference between using <strong> and <em> instead of the CSS
There is a pretty strong need for us to design some workflows around various
There are many techniques to enforce strong passwords on website: Requesting that passwords pass
Is there a string.Empty in JavaScript, or is it just a case of checking
First, I know that it doesn't make sense to compare the dllimport attribute and
I'm using AS3 to base64 encode a JPG and pass it to Javascript. I'm
Are there any reasons not to reuse an NServiceBus message ( IMessage ) in
This is a slightly unusual request as I know there are plugins out there
We're using ITextSharp for reasons I do not understand and we dont have the
I have an asynchronous operation that for various reasons needs to be triggered using

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.