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 trialRicardo Acuna
9,014 PointsWhy does my todo_item_spec.rb is telling me that I didn't pass any arguments?
1) TodoItem Failure/Error: it { should belong_to{:todo_lists} } ArgumentError: wrong number of arguments (0 for 1)
1 Answer
Ricardo Acuna
9,014 PointsI fixed it. I'm using rails 4.1.4, I guess the new version doesn't take a hash just a single param.
so
it { should belong_to{:todo_list} }
becomes
it { should belong_to :todo_list }
thomascawthorn
22,986 Pointsthomascawthorn
22,986 PointsI think to answer this, we'll have to see the relevant code! Looks like we'll need the the code from your TodoItem model test and the TodoItem Model.