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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T03:45:35+00:00 2026-05-15T03:45:35+00:00

I have generated some scaffolding for my rails app. I am running the generated

  • 0

I have generated some scaffolding for my rails app.

I am running the generated tests and they are failing.

for example

  test "should create area" do
    assert_difference('Area.count') do
      post :create, :area => { :name => 'area1' }
    end

    assert_redirected_to area_path(assigns(:area))
  end

This test is failing saying that :

1) Failure:
test_should_create_area(AreasControllerTest)
[/test/functional/areas_controller_test.rb:16]:
“Area.count” didn’t change by 1. <3>
expected but was <2>.

There is only one field in the model : name. I am populating this so it cant be because I am failing to populate the only field.

I can run the site and create an area with the name ‘area1’. So reality is succeeding, but the test is failing.

I cant ask why its failing, because Im sure theres not enough information here for anyone here to know why. Im just stuck at knowing what avenues to go down to work out why the test is failing. Even putting puts into the code dont print out…

What steps can I take to track this down?

  • 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-15T03:45:36+00:00Added an answer on May 15, 2026 at 3:45 am

    Per the request above, and matching what I was expecting that you’d find when you dug into your logs, you have an authorization that isn’t being met in your test.

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

Sidebar

Related Questions

I have an automated test running on my program that generates some large MPG
I'm working on databases that have moving tables auto-generated by some obscure tools. By
I have a PHP-generated page which is displaying some data about a set of
I'm matching ASP.Net generated elements by ID name, but I have some elements which
If I have some types e.g: public class SomeType //Generated by some codegen i
At work I work closely with MS-Office. I have managed to generate some scripts
I have a task and I want to generate some code using the CodeDom.
i have several common elements (components), that will generate some html. it seems my
I have a Java string of XML content. I use Velocity to generate some
I have some code that generates image of a pie chart. It's a general

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.