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

Writing Tests getting Argument Error: Wrong Number of Arguments (0 for 1) test/unit/user_test.rb:5:in `block in <class:UserTest>'

Keep getting this error and can't find this exact one in the forum. Have been following exactly and have just hit my first hiccup. Here is user_test.rb

test "a user should enter a first name" do |variable|
    user = User.new
    assert !user.save
end

I have cleared out the users.yml file and now get this error, where the first pass should had been.

1 Answer

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Try taking out the "|variable|" portion of that test and that should do the trick.