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! While you're at it, check out some resources Treehouse students have shared here.

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



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
Jason Seifer
Treehouse Guest Teacher

What does your profile_controller say in the show method?