Makes sense... So would you tend to use double() in place of mock()/
stub()?
On May 27, 1:22 pm, David Chelimsky wrote:
> On May 26, 2010, at 10:01 PM, rhydiant wrote:
>
> > Given that RSpec has the following methods to create test doubles ...
>
> > double(:my_t
Given that RSpec has the following methods to create test doubles ...
double(:my_test_double)
mock(:my_mock_object)
stub(:my_stub)
Is there a way to/ plans to introduce a similar syntax for null
objects?
null_object(:my_null_object)
Instead of mock(:bar, :is_null_object => true) or
mock
Thanks for the reply David, works a treat. I'll probably end up
refacting away from that design but right now that's exactly what I
need.
Regards
Rhydian
On May 17, 9:10 am, David Chelimsky wrote:
> On May 15, 2010, at 2:56 AM, rhydiant wrote:
>
>
>
> > I'
I'm writting a code example for the following method:
def upload(email_address, product_data)
errors = []
user = resolve_user_from(email_address)
product_file_name = ProductFileHandler.persist(user,
product_data, errors)
if errors.blank?
# ... do some stuff