Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

test_that_var_are_assigned_on_successful_profile_viewing

test_that_var_are_assigned_on_successful_profile_viewing(ProfilesControllerTest) [test/functional/profiles_controller_test.rb:19]: Expected [] to not be empty.

When running the test for profile controller I get this error, does anyone know how can I fixit?

test "that var are assigned on successful profile viewing" do get :show, id: users(:ben).profile_name assert assigns(:user) assert_not_empty assigns(:statuses) end

John Murphy
John Murphy
1,122 Points

Hi Alex, did you ever get this resolved? Im having the same problem and have no idea whats going wrong. I've even compared my code to several other Treebook users on github and can see no difference!

1 Answer

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

What does your profile_controller say in the show method?