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

Ruby

Block UI errors

Hey guys, I'm kinda lost one where to start fixing these errors I got running the "user_friendship_controller_test" where I got 17 errors, but most of them are similar, I'm just not sure where to look. Now the all reference tests in the context of 'index' I believe, but they have this error in common:

ActionView::Template::Error: No route matches {:action=>"show", :controller=>"user_friendships", :list=>"blocked"}

Thanks.

1 Answer

Got some of it, most of it was a typo in the index.html.erb, but I have a failure and a few more errors left over.

The errors all have a similar output:

NoMethodError: undefined method `accepted_user_friendships' for #    <User:0x4d50a88>

The failure:

test: #index when logged in pending friendships should not display pending or active friend's names. (UserFriendshipsControllerTest) [test/functional/user_friendships_controller_test.rb:77]:</Blocked/> expected to not match

The code that its referring to:

should "not display pending or active friend's names" do
   assert_no_match /Blocked/, response.body
   assert_no_match /Active/, response.body
end

Thanks.