As I mentioned before, for this test, we will use a different testing tool called RSpec and Factory Girl.
RSpec is a testing tool for the Ruby programming language. Born under the banner of Behavior-Driven Development, it is designed to make Test-Driven Development a productive and enjoyable experience (http://rspec.info/).
factory_girl is a fixtures replacement with a straightforward definition syntax, support for multiple build strategies (saved instances, unsaved instances, attribute hashes, and stubbed objects), and support for multiple factories for the same class (user, admin_user, and so on), including factory inheritance (https://github.com/thoughtbot/factory_girl).
In this condition, we are going to replace ...