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 mailin

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

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 i

Re: [rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
David, On Sep 21, 2007, at 11:19 PM, David Chelimsky wrote: > 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

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 bett

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 e

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 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 Subject: Re: [rspec-users

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 C

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

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

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 Y a

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.tmbundl

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

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

2007-09-21 Thread Lance Carlson
wow nevermind :) assigns[:subdomain] = 'test' On 9/21/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Wait I think the problem stemmed from the fact that I started to > prefix all of my urls with :subdomain. Could this be a possibility? If > so, how to get around this? > > On 9/21/07, Lance Ca

[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 hand

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

2007-09-21 Thread Lance Carlson
Wait I think the problem stemmed from the fact that I started to prefix all of my urls with :subdomain. Could this be a possibility? If so, how to get around this? On 9/21/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > BTW I also tried this: > > template.stub!(:edit_label_url).and_return('') > > b

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=

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 know this is old, but did you know you can do this? iink_to a.name, [EMAIL PROTECTED], @project],,{:class=>"show",:title=>"Show > actor details"} ? I'm having trouble mocking this my view specs right now as it is giving me errors, but it works fine in rails edge. I will report on my discove

[rspec-users] given_it

2007-09-21 Thread Yurii Rashkovskii
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 was not sure if this possibility already exists in rspec (and, honestly, was lazy to c

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

2007-09-21 Thread Dan North
Although it would be nice (and not too difficult) to have the example runner intercept any class creation (and perhaps other global/constant definitions) and undef them after each example. It certainly seems reasonable to have any defined classes go away after an example. aslak hellesoy wrot