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
Jordan Saxe
4,713 PointsProfile Controller Code Challenge
The code challenge I am doing is asking for the following: "As part of this test, add a get to the show page with the id parameter set to the profile name of the fixture for 'mikethefrog'." My code so far is:
require 'test_helper'
class ProfilesControllerTest < ActionController::TestCase
test "should get show" do
get :show, id: user(:mikethefrog).profile_name
end
end
I keep getting the following error: The 'get' method was expected, but it looks like you didn't use it.
2 Answers
Ivan Dimitrov
10,587 PointsHello Jordan,
I think the code should be
users(:mikethefrog).profile_name
instead of
user(:mikethefrog).profile_name
Try it our. I hope it works.
Christopher Johnson
Python Web Development Techdegree Student 11,422 Pointsyes, changing user to users worked for me.