Ruby on Rails / Testing
In a contrast to Test Driven Development in a Behavior Driven Development, you create software by describing it from the end user perspective. In BDD you didn’t test given method but a given scenario.
If you have a sign in form in your application you can create following scenarios:
In Ruby on Rails, you can implement acceptance tests using RSpec or Capybara. In order to get the best results, it’s good to have both unit and acceptance tests. From the business perspective implementation details are less important than application behavior but from the performance perspective is inversely.
It’s a success to satisfy both business and performance goals and proper tests are one of the best tools available to achieve this.