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 Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Cleaning Up Our View

Matias Fernandez
Matias Fernandez
8,242 Points

be_false & be_true != be false & be true

Heads up,

false != be_false in rspec anymore.

I had to do some research to get my code to pass. (changed "be_false" to "be false")

I know Treehouse is updating this section, just a heads up so people don't get stuck like I did.

http://bengribaudo.com/blog/2014/01/17/2674/rspec-be-true-be_true-are-different

2 Answers

Mine still passed as it shows in the video, but it threw this error:

Deprecation Warnings:

`be_false` is deprecated. Use `be_falsey` (for Ruby's conditional semantics) or 
`be false` (for exact `== false` equality) instead. 
Called from 
/home/treehouse/projects/odot/spec/models/todo_item_spec.rb:11:in 
`block (3 levels) in <top (required)>'.

I ended up deciding to roll with "be_falsey" and "be_truthy" instead!

kabir k
kabir k
Courses Plus Student 18,036 Points

Wow....thank you guys, you saved my behind. I was about to pull my hair out, after staring at the code for hours!

Hate being mr. negative but spent so much time trying to get test to pass til I found this post. These being paid courses, I'd think they'd be updated. This particular course jumps around so much with very little explanation. Feels more like a typing class. Venting.

Jason Foster
Jason Foster
26,231 Points

Agreed.

It is a bit tough to follow. I don't feel like I'm absorbing the concepts behind why everything is done the way it is. I don't learn much when I'm just chasing down files and typing.....