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'
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