Cleaner Rspec

Posted Over 11 years ago by Nasir Jamal.

When simply checking equality or truthiness then Instead of: it "should have role set to admin" do @user.role.should eql('admin...

Keeping your specs DRY

Posted Almost 12 years ago by Julien Letessier.

I often see long before blocks with lots of should_receive...

...and_return inside. Remember that before blocks are about...