Thank you for your explanation!
Ruud
On Mar 5, 3:10 pm, David Chelimsky wrote:
> On Mon, Mar 5, 2012 at 2:18 AM, ruud144 wrote:
> > hi group,
>
> > I read that expectations can print a custom message on failure using a
> > syntax like
>
> > cars.should be_empty, "Cars left"
>
> > But when I try
On Mar 5, 2012, at 1:18 AM, ruud144 wrote:
> hi group,
>
> I read that expectations can print a custom message on failure using a
> syntax like
>
> cars.should be_empty, "Cars left"
This is because RSpec predicate matchers can accept a block:
https://github.com/rspec/rspec-expectations/blob/ma
On Mon, Mar 5, 2012 at 2:18 AM, ruud144 wrote:
> hi group,
>
> I read that expectations can print a custom message on failure using a
> syntax like
>
> cars.should be_empty, "Cars left"
>
> But when I try this syntax for this expectation:
>
> string.should == 'Cars left', 'Yippee, no cars anymore'
On Mar 5, 2012, at 5:05 AM, Andrew Premdas wrote:
>
> On 3 March 2012 21:55, Greg C. wrote:
> Background: So I have roughly:
>
> class A
> def calculate_input_datetimes
> # do stuff to calculate datetimes - then for each one identified
> process_datetimes(my_datetime_start, my_dat
hi group,
I read that expectations can print a custom message on failure using a
syntax like
cars.should be_empty, "Cars left"
But when I try this syntax for this expectation:
string.should == 'Cars left', 'Yippee, no cars anymore'
I get a syntax error:
syntax error, unexpected ',', expecting
On 3 March 2012 21:55, Greg C. wrote:
> Background: So I have roughly:
>
> class A
> def calculate_input_datetimes
> # do stuff to calculate datetimes - then for each one identified
> process_datetimes(my_datetime_start, my_datetime_end)
> end
>
> My thoughts on this is that this m