Re: [rspec-users] Standardize environment between specs containing class defs

2007-09-21 Thread aslak hellesoy
You can have a global after block in your spec_helper.rb that undefines all such constants. Then you just have to remember to add these constants to some global array whenever you define them. a On 9/21/07, Matt Margolis [EMAIL PROTECTED] wrote: I have some specs that involve the use of eval

[rspec-users] TextMate Bundle and exception when switching to alternate file.

2007-09-21 Thread Trevor Squires
Hey, sorry if this is something better suited to another list. I've encountered a strange problem with the RSpec.tmbundle in trunk - namely that it was raising an exception when pressing ctrl-shift-downarrow (switch between spec and source - Alternate File). I tracked down the issue to be

Re: [rspec-users] RSpec view spec writing problem (unable to generate url_for in RESTful resource link_to)

2007-09-21 Thread Lance Carlson
BTW I also tried this: template.stub!(:edit_label_url).and_return('') but the same error continues to persist On 9/21/07, Lance Carlson [EMAIL PROTECTED] wrote: BTW I know this is old, but did you know you can do this? iink_to a.name, [EMAIL PROTECTED], @project],,{:class=show,:title=Show

Re: [rspec-users] given_it

2007-09-21 Thread David Chelimsky
Have you seen shared behaviours? On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote: Hello, Just decided to check whether I am doing something that makes sense or not. I was thinking about how cool would it be to re-use examples (just like we reuse story scenarios with GivenScenario). I

Re: [rspec-users] TextMate Bundle and exception when switching to alternate file.

2007-09-21 Thread David Chelimsky
Please submit this to the tracker as a patch. http://rubyforge.org/tracker/index.php?group_id=797 Thanks, David On 9/21/07, Trevor Squires [EMAIL PROTECTED] wrote: Hey, sorry if this is something better suited to another list. I've encountered a strange problem with the RSpec.tmbundle in

Re: [rspec-users] given_it

2007-09-21 Thread David Chelimsky
On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote: Sure! But they are not the same stuff. What I was looking for is it should do #1 do ... end it should do X after #1 do given_it should do #1 should do_x end it should do Y after #1 do given_it should do #1 should do_y

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
Sure! But they are not the same stuff. What I was looking for is it should do #1 do ... end it should do X after #1 do given_it should do #1 should do_x end it should do Y after #1 do given_it should do #1 should do_y end it should do Z after #1 Y do given_it should do

Re: [rspec-users] given_it

2007-09-21 Thread lancecarlson
This concept violates oo if you want to test whether or not r method calls another method you would do that in the test and label it occordingly. What you are defining is such a narrow use case I think it would be abused Sent via BlackBerry from T-Mobile -Original Message- From: David

Re: [rspec-users] given_it

2007-09-21 Thread lancecarlson
If you want to reuse stuff in your tests put those test methods in a separate module and include them into you specs Sent via BlackBerry from T-Mobile -Original Message- From: Yurii Rashkovskii [EMAIL PROTECTED] Date: Fri, 21 Sep 2007 23:12:50 To:rspec-users rspec-users@rubyforge.org

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
Then I will have tens of methods that in fact has nothing really different from reused examples On Sep 21, 2007, at 11:14 PM, [EMAIL PROTECTED] wrote: If you want to reuse stuff in your tests put those test methods in a separate module and include them into you specs Sent via BlackBerry

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
Ok, let me try to explain. I have some controllers that are doing some kind of main action and some additional ones. These actions are belong to different aspects of logic and thus I'd prefer to test them separately to have clean and nice code that can be easily modified. Then, what's

Re: [rspec-users] given_it

2007-09-21 Thread David Chelimsky
On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote: Then I will have tens of methods that in fact has nothing really different from reused examples But, as methods, they are more clearly differentiated for reuse. The problem is that if I reuse an example, and then decide to change that

Re: [rspec-users] given_it

2007-09-21 Thread Dan North
I have to agree with David. (It's in the contract ;) Scenarios are reusable as steps in order to chain multiple scenarios together (to describe the various coarse-grained stages of a workflow, state machine or wizard, for example). At an example level it is just confusing. I've noticed that

Re: [rspec-users] TextMate Bundle and exception when switching to alternate file.

2007-09-21 Thread Scott Taylor
sorry if this is something better suited to another list. I've encountered a strange problem with the RSpec.tmbundle in trunk - namely that it was raising an exception when pressing ctrl-shift-downarrow (switch between spec and source - Alternate File). I tracked down the issue to be

Re: [rspec-users] Getting Started with Story Runner

2007-09-21 Thread Andrew WC Brown
I'm trying to generate stories based on Dan North's example. I'm not sure how to do this. require File.join(File.dirname(__FILE__), helper) Story Account Holder withdraws cash, %{ As an Account Holder I want to withdraw cash from an ATM So that I can get money when the bank is closed },

Re: [rspec-users] TextMate Bundle and exception when switching to alternate file.

2007-09-21 Thread Trevor Squires
Yeah, I've filed a patch for it - #14140 Regards, Trevor On 9/21/07, Scott Taylor [EMAIL PROTECTED] wrote: Nope - it's a bug. I've experienced the same thing too. Scott -- -- Trevor Squires http://somethinglearned.com ___ rspec-users mailing