[rspec-users] RSpec, shoulda-matchers and Rails model attributes validations

2011-07-28 Thread Piter Fcbk
I was trying out RSpec framework in a project and got stopped doing the unit test of a model. In particular, doing the test for the associations and the ActiveRecord validations. I started writing the validations but my tests didn't look DRY at all. Before refactoring the tests checked out and look

[rspec-users] Best way to test tasks

2011-08-02 Thread Piter Fcbk
I have a task that runs frequently in order to get/import data from another system. Because of this I wanted to know which is the best way to test tasks in order to create the tests needed. Thanks in advance. ___ rspec-users mailing list rspec-users@ruby

Re: [rspec-users] Best way to test tasks

2011-08-02 Thread Piter Fcbk
On Aug 2, 2011, at 4:41 PM, Piter Fcbk wrote: > > > I have a task that runs frequently in order to get/import data from > another system. > > Because of this I wanted to know which is the best way to test tasks in > order to create the tests needed. > > > > Thanks in

[rspec-users] How to test modules and custom validators

2011-08-03 Thread Piter Fcbk
I'm trying to have most of the important stuff tested and in order to do that I run in front of some stuff I'm not quite sure which is the best way to test them. At this time I am having question around how to test modules and the custom validators (the typical email format validator for example).