Forum: RSpec [Cucumber] --dry-run

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3464536ce6396bacc132ad18d2c46489?d=identicon&s=25 Tim Walker (timw)
on 2009-02-02 19:09
(Received via mailing list)
Hi Guys,

I see in the Cucmber --help that -d akd --dry-run is supported but it
doesn't seem to work.

Anyone know why?

Thanks, very much.

Tim
0be0e4aa42aacd9a8a95c792de273ca7?d=identicon&s=25 Aslak Hellesøy (aslakhellesoy)
on 2009-02-02 19:14
(Received via mailing list)
On Mon, Feb 2, 2009 at 7:00 PM, Tim Walker <walketim@gmail.com> wrote:
> Hi Guys,
>
> I see in the Cucmber --help that -d akd --dry-run is supported but it
> doesn't seem to work.
>
> Anyone know why?
>

Because it has a bug that has been fixed in 0.2 prereleases (0.1.99.x)
http://tinyurl.com/cucumber-0-2-beta

Aslak
Dfcd73fa8a6bc76cede331d3a9ffa173?d=identicon&s=25 Ben Greenberg (Guest)
on 2009-02-03 01:19
(Received via mailing list)
Hi all,

This spec always passes:

     lambda do
       process_card @credit_card, billing_info, 10604, '1.1.1.1',
@gateway
     end.should raise_error(MinimalCart::CaptureFailureError) do |ex|
       ex.should be_nil
       ex.should_not be_nil
       ex.responses.should be_nil
       ex.responses.should_include @auth_response
       ex.responses.include?.with('a').should be_true
     end

Clearly, it makes no sense.  Somehow the exception validation block is
not running.  What am I doing wrong?

Thanks
Ben
369b9fd2a0d9e7cdbc60907a2a056ad9?d=identicon&s=25 Scott Taylor (Guest)
on 2009-02-03 01:31
(Received via mailing list)
On Feb 2, 2009, at 6:30 PM, Ben Greenberg wrote:

>      ex.responses.should be_nil
>      ex.responses.should_include @auth_response
>      ex.responses.include?.with('a').should be_true
>    end
>
> Clearly, it makes no sense.  Somehow the exception validation block
> is not running.  What am I doing wrong?

raise_error doesn't take a block, and so it's being ignored:

http://rspec.rubyforge.org/rspec/1.1.12/classes/Sp...

Scott
369b9fd2a0d9e7cdbc60907a2a056ad9?d=identicon&s=25 Scott Taylor (Guest)
on 2009-02-03 02:07
(Received via mailing list)
On Feb 2, 2009, at 6:30 PM, Ben Greenberg wrote:

>      ex.responses.should be_nil
>      ex.responses.should_include @auth_response
>      ex.responses.include?.with('a').should be_true
>    end
>
> Clearly, it makes no sense.  Somehow the exception validation block
> is not running.  What am I doing wrong?

Disregard my last email.  I was being stupid.

Scott
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2009-02-03 02:13
(Received via mailing list)
On Mon, Feb 2, 2009 at 3:30 PM, Ben Greenberg
<mailing_lists@bengreenberg.net> wrote:
>      ex.responses.should_include @auth_response
>      ex.responses.include?.with('a').should be_true
>    end
>
> Clearly, it makes no sense.  Somehow the exception validation block is not
> running.  What am I doing wrong?

try using { } instead of do..end.  Pretty sure that the problem you're
experiencing has to do with Ruby's block precedence.

Pat
42172acdf3c6046f84d644cb0b94642c?d=identicon&s=25 Pat Maddox (pergesu)
on 2009-02-03 02:35
(Received via mailing list)
On Mon, Feb 2, 2009 at 4:22 PM, Pat Maddox <pergesu@gmail.com> wrote:
>>      ex.should_not be_nil
>>      ex.responses.should be_nil
>>      ex.responses.should_include @auth_response
>>      ex.responses.include?.with('a').should be_true
>>    end
>>
>> Clearly, it makes no sense.  Somehow the exception validation block is not
>> running.  What am I doing wrong?
>
> try using { } instead of do..end.  Pretty sure that the problem you're
> experiencing has to do with Ruby's block precedence.

oops I should have been more specific.  I meant use { } for the block
after raise_error:

 lambda do
     process_card @credit_card, billing_info, 10604, '1.1.1.1', @gateway
   end.should raise_error(MinimalCart::CaptureFailureError) { |ex|
     ex.should be_nil
     ex.should_not be_nil
     ex.responses.should be_nil
     ex.responses.should_include @auth_response
     ex.responses.include?.with('a').should be_true
   }

Although I think that do..end.method is hideous and so I would change
the lambda to use curly braces as well :)

Pat
Dfcd73fa8a6bc76cede331d3a9ffa173?d=identicon&s=25 Ben Greenberg (Guest)
on 2009-02-04 22:08
(Received via mailing list)
Hi all,

This spec always passes:

     lambda do
       process_card @credit_card, billing_info, 10604, '1.1.1.1',
@gateway
     end.should raise_error(MinimalCart::CaptureFailureError) do |ex|
       ex.should be_nil
       ex.should_not be_nil
       ex.responses.should be_nil
       ex.responses.should_include @auth_response
       ex.responses.include?.with('a').should be_true
     end

Clearly, it makes no sense.  Somehow the exception validation block is
not running.  What am I doing wrong?

Thanks
Ben
This topic is locked and can not be replied to.