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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:50:28+00:00 2026-06-02T08:50:28+00:00

In my app I am testing creating a new project. Currently I do it

  • 0

In my app I am testing creating a new project. Currently I do it with integration test using rspec. Here’s my code:

  3 describe "Projects" do
  4   describe "create project" do
  5     it "should create a new project" do
  6       lambda do
  7         visit root_path
  8         click_link 'new project'        
  9         fill_in :name, :with => 'Project name'
 10         fill_in :description, :with => 'This is a description'
 11         click_button 'Create'
 12       end.should change(Project, :count).by(1)
 13     end
 14   end
 15 end

I would also like to add after line 11 something like :

response.should render_template 'new'

…but I keep getting this error

@request must be an ActionDispatch::Request

Am I doing this right? What is the best practice?

  • 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-06-02T08:50:29+00:00Added an answer on June 2, 2026 at 8:50 am
    current_path.should == new_project_path
    page.should have_selector('div#error_explanation')
    

    According to this https://stackoverflow.com/a/9105371/724036

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

Sidebar

Related Questions

I'm currently creating an iPhone app and we need some testing with about 20~30
I'm currently testing the controller in my mvc app and I'm creating a fake
I am using this code: File myDir = new File(getApplicationContext().getFilesDir().getAbsolutePath()); try { Log.i(CSV Testing
I'm creating a test which will perform some stress testing of the app which
I'm currently working on creating an environment to test performance of an app; I'm
I'm using JDK 7 and testing Play! 1.2.4. I was creating a test class
First off I'm new at programming. I'm creating an app with one navigation bar
I'm preparing for performance tests and creating new test cases. So I was just
I im creating a simple testing app that runs a check every hour on
Good Day, I'm having few issues with Doctrine entities generator while creating new project

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.