Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Anthony Myers
5,848 PointsIntegration Test Error
I'm on the very first video for Integration Testing Our Whole App section in the Rails beginner course.
My custom_test.rb file is this:
require 'test_helper'
class CustomTest < ActionDispatch::IntegrationTest
test "that login route opens the login page" do
get '/login'
assert_response :success
end
end
But when I run the test, I get this error in terminal:
1) Error: CustomTest#test_that_login_route_opens_the_login_page: ActiveRecord::Fixture::FormatError: ActiveRecord::Fixture::FormatError
1 runs, 0 assertions, 0 failures, 1 errors, 0 skips
I've been looking around for this particular error, and I'm not finding much on it. Can anyone help me out with this?
Does this have to do with the fact that I'm using Rails 4?
I checked the rails guides docs, and it does show the code as being right, so I'm not to sure what I should do.

Anthony Myers
5,848 PointsThanks, David, but no that is in another section of the course.

Bernardo Simões
3,233 PointsYou probably don't have a valid yaml fixture. Can you post your fixtures code?
3 Answers

Jason Seifer
Treehouse Guest TeacherAnthony Myers in your test/fixtures/users.yml
file, everything below the line that says "tony:" needs to be indented with two spaces, then that error should disappear.

Anthony Myers
5,848 PointsThanks, Jason!

Jason Seifer
Treehouse Guest TeacherHey Anthony Myers try checking all of the yml
files in your test/fixtures
directory. Make sure that any indentation is done with spaces instead of tabs. You can also post a link to your code up on GitHub and we can take a look.

Anthony Myers
5,848 PointsThanks, Jason Seifer here is the link to the app so far, on github: https://github.com/Preeminent/treebook

Anthony Myers
5,848 PointsThanks, Bernardo Simões , here is the users.yml test file
tony:
first_name: "tony"
last_name: "test"
profile_name: "demodude"
password: "password"
password_confirmation: "password"
David Curtis
11,301 PointsDavid Curtis
11,301 PointsMaybe this will help? https://teamtreehouse.com/forum/writing-tests-error-activerecordfixtureformaterror-activerecordfixtureformaterror