Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread Farley Knight
On 9/16/07, Mark Van De Vyver <[EMAIL PROTECTED]> wrote: > > Hi, > On 9/17/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 9/16/07, s.ross <[EMAIL PROTECTED]> wrote: > > > While the spirit of BDD is to spec first and code second, many of us > > > have legacy code. Worse, some of us have legac

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread Mark Van De Vyver
Hi, On 9/17/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 9/16/07, s.ross <[EMAIL PROTECTED]> wrote: > > While the spirit of BDD is to spec first and code second, many of us > > have legacy code. Worse, some of us have legacy code without very > > good coverage. Recognizing that *I* have such

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread lancecarlson
Yes that is nice because you know what files aren't really being used. That is asiming you tested everything that is being used! Sent via BlackBerry from T-Mobile -Original Message- From: Scott Taylor <[EMAIL PROTECTED]> Date: Sun, 16 Sep 2007 15:45:34 To:rspec-users Subject: Re: [rspe

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread court3nay
Test/spec + mocha On Sep 16, 2007, at 8:44 AM, "Pat Maddox" <[EMAIL PROTECTED]> wrote: > On 9/16/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> I've been working on a Rails project with one other developer; he was >> using Test::Unit, and I was using RSpec. That works OK for a >> while, but >> o

Re: [rspec-users] "rake spec:doc" returns NO NAME (due to --dry-run) for each specify block

2007-09-16 Thread Christopher D. Pratt
Thanks for all the responses. Unfortunately, I apparently just like being difficult. Tom: I installed the new version of rspec on a fresh app, so the first run of script/generate rspec was from the trunk version ... good idea though, because it sounds like something I would have done - Davi

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread Scott Taylor
>> >> >> I agree with David (you can also look at the ZenTest suite, which has >> a similar tool). I haven't looked at the tool, but how about >> modifying it to create comments in the specs, somthing like this: >> >> # You haven't specified the behaviour of User#method1! >> # You haven't specifie

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Pat Maddox
On 9/16/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > I've been working on a Rails project with one other developer; he was > using Test::Unit, and I was using RSpec. That works OK for a while, but > obviously it starts causing pain when you have to check in two places to > see if a piece of code is

Re: [rspec-users] how do I get the beautiful html rspec results in textmate?

2007-09-16 Thread Scott Taylor
On Sep 16, 2007, at 9:43 PM, Andrew WC Brown wrote: > I'm going through PeepCode RSpec Basics and he gets a beautiful > rspec results page in html when he presses a hotkey in TextMate. > I would guess it's along the lines of Apple + R but I don't get the > same results and I'm using the same

[rspec-users] how do I get the beautiful html rspec results in textmate?

2007-09-16 Thread Andrew WC Brown
I'm going through PeepCode RSpec Basics and he gets a beautiful rspec results page in html when he presses a hotkey in TextMate. I would guess it's along the lines of Apple + R but I don't get the same results and I'm using the same bundle. ___ rspec-user

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread s.ross
As with all development tools, caveat programmer. The art is in recognizing the behaviors and not just exercising the methods meaninglessly. I personally believe that having the method tests in spec form allows me to think about what the methods are *doing* and then write the real behavior

Re: [rspec-users] How to write a plugin that uses rspec internally?

2007-09-16 Thread Eivind Uggedal
On 9/15/07, David James <[EMAIL PROTECTED]> wrote: > (c) Would you recommend any particular plugins to study along these lines? I recently (a few minutes ago) released a plugin using RSpec to test it's code: http://acts-as-authentable.googlecode.com/ -- Cheers, Eivind Uggedal Engineer, Faculty

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread Pat Maddox
On 9/16/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Sep 16, 2007, at 3:04 PM, David Chelimsky wrote: > > > On 9/16/07, s.ross <[EMAIL PROTECTED]> wrote: > >> While the spirit of BDD is to spec first and code second, many of us > >> have legacy code. Worse, some of us have legacy code without

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread Scott Taylor
On Sep 16, 2007, at 3:04 PM, David Chelimsky wrote: > On 9/16/07, s.ross <[EMAIL PROTECTED]> wrote: >> While the spirit of BDD is to spec first and code second, many of us >> have legacy code. Worse, some of us have legacy code without very >> good coverage. Recognizing that *I* have such code, I

Re: [rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread Andrew WC Brown
Both Solved, User Error =P On 9/16/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > Oh, he removed the block. > > describe PeepCode do > it "should be awsome" do > end > end > > describe PeepCode do > it "should be awsome" > end > > I'm still haven't solved --format with specing. > > On 9

Re: [rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread Andrew WC Brown
Oh, he removed the block. describe PeepCode do it "should be awsome" do end end describe PeepCode do it "should be awsome" end I'm still haven't solved --format with specing. On 9/16/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 9/16/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote:

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread Pat Maddox
On 9/16/07, s.ross <[EMAIL PROTECTED]> wrote: > While the spirit of BDD is to spec first and code second, many of us > have legacy code. Worse, some of us have legacy code without very > good coverage. Recognizing that *I* have such code, I created a > script that grinds through your .rb files and

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread David Chelimsky
On 9/16/07, s.ross <[EMAIL PROTECTED]> wrote: > While the spirit of BDD is to spec first and code second, many of us > have legacy code. Worse, some of us have legacy code without very > good coverage. Recognizing that *I* have such code, I created a > script that grinds through your .rb files and

Re: [rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread David Chelimsky
On 9/16/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > I'm going through Peepcode's Rspec Basics for an overview. > > He's just doing a simple spec: > > class PeepCode > end > > describe PeepCode do > it "should be awsome" do > end > end > > So running spec spec/simple_spec.rb should produc

[rspec-users] "Not Implemented" doesn't show

2007-09-16 Thread Andrew WC Brown
I'm going through Peepcode's Rspec Basics for an overview. He's just doing a simple spec: class PeepCode end describe PeepCode do it "should be awsome" do end end So running spec spec/simple_spec.rb should produce according to his screen cast: 1 example, 0 failures, 1 not implemented but I

[rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread s.ross
While the spirit of BDD is to spec first and code second, many of us have legacy code. Worse, some of us have legacy code without very good coverage. Recognizing that *I* have such code, I created a script that grinds through your .rb files and creates placeholder specs for each public meth

Re: [rspec-users] How I won the RSpec fight

2007-09-16 Thread Scott Taylor
On Sep 16, 2007, at 9:38 AM, Jay Levitt wrote: > I've been working on a Rails project with one other developer; he was > using Test::Unit, and I was using RSpec. That works OK for a > while, but > obviously it starts causing pain when you have to check in two > places to > see if a piece of

Re: [rspec-users] How far to go with ActiveRecord unit tests without hitting the database?

2007-09-16 Thread Scott Taylor
On Sep 16, 2007, at 1:20 AM, David James wrote: > I'm currently try to push my limits a little bit with some of my > unit testing -- trying to avoid saving ActiveRecord objects to the > database and take advantage of mock/stub objects. > > How far should I expect to get in this direction? Fr

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Andrew WC Brown
You may have lost the fight, but you didn't lose the war. On 9/16/07, Andrew WC Brown <[EMAIL PROTECTED]> wrote: > > I honestly didn't understand what I was testing for when I was using TDD. > I can't imagine starting a project without using rspec. > Rspec reads much clearly and keeps me in scope.

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Andrew WC Brown
I honestly didn't understand what I was testing for when I was using TDD. I can't imagine starting a project without using rspec. Rspec reads much clearly and keeps me in scope. The same reason I can't imagine starting a project without ruby. Freedom is Slavery! On 9/16/07, David James <[EMAIL PR

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread David James
In case it helps those who want to make it a little easier to try both at the same time (i.e. a bridge), ReinH has got a script that helps use autotest growl with both Test::Unit and RSpec: http://reinh.com/2007/9/12/the-autotest-rosetta-stone ___ rspec-u

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Jay Levitt
On 9/16/2007 10:18 AM, Kevin Williams wrote: > By all means, they should not ever try anything new. The people of > Earth should not have ever adopted the use of the electric light bulb > or the radio or the automobile or the airplane or the microwave or the > telephone or ... the Internet. No, don

Re: [rspec-users] #add method?

2007-09-16 Thread David James
I wish I was more specific, indeed. :) While scouring the Web for examples of mocking ActiveRecord associations (see other thread), I saw the add method -- but couldn't figure out what it did. That made me wonder if it was perhaps some special construct in RSpec (perhaps for helping with associat

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Wincent Colaiuta
El 16/9/2007, a las 15:38, Jay Levitt escribió: > * Test::Unit is ubiquitous. Everyone knows it. This is hard to > counter; it comes with Rails and is the default. Sorry to hear that you lost the fight. And that "better" doesn't always win. For me "better" beats "ubiquitous" any time. Ah wel

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Kevin Williams
By all means, they should not ever try anything new. The people of Earth should not have ever adopted the use of the electric light bulb or the radio or the automobile or the airplane or the microwave or the telephone or ... the Internet. No, don't adopt anything new, just stick to the old ways of

[rspec-users] I lost the RSpec fight

2007-09-16 Thread Jay Levitt
I've been working on a Rails project with one other developer; he was using Test::Unit, and I was using RSpec. That works OK for a while, but obviously it starts causing pain when you have to check in two places to see if a piece of code is properly tested/spec'd, you can't use TextMate shortc

Re: [rspec-users] "rake spec:doc" returns NO NAME (due to --dry-run) for each specify block

2007-09-16 Thread aslak hellesoy
This happens if you have it blocks with no name. RSpec tries to generate names based on the code inside, but with dry run it isn't executed, so it can't. But maybe you don't have empty it blocks? I'm just guessing here... Aslak On 9/16/07, Christopher D. Pratt <[EMAIL PROTECTED]> wrote: > I went

Re: [rspec-users] "rake spec:doc" returns NO NAME (due to --dry-run) for each specify block

2007-09-16 Thread David Chelimsky
When you use spec:doc, it does a dry-run, in which case the blocks are never executed, in which case you get this message for every block relying on auto-generated names: describe 5 do it { 5.should == 5} end If you mean to use the specdoc format (i.e. it really runs everything and you get the

[rspec-users] "rake spec:doc" returns NO NAME (due to --dry-run) for each specify block

2007-09-16 Thread Christopher D. Pratt
I went ahead and moved to the trunk versions of RSpec and Spec:Rails because I wanted to try out the new Story Runner feature. However, when I tried to do "rake spec:doc", I got the following: AccountController - NO NAME (Because of --dry-run) AccountHelper - NO NAME (Because of --dry-run) User

Re: [rspec-users] How far to go with ActiveRecord unit tests without hitting the database?

2007-09-16 Thread Tom Stuart
On 16 Sep 2007, at 06:43, Pat Maddox wrote: > You can't assign mock objects to associations. Actually I haven't had any trouble with e.g. @company = Company.new :name => 'BigCo' @mock_employee = mock_model(Employee, :name => 'Pat', :[]= => true, :save => true) @company.employees << @mo

Re: [rspec-users] #add method?

2007-09-16 Thread Tom Stuart
On 16 Sep 2007, at 06:12, David James wrote: > I've seen reference to an 'add' method, as in Model.add. When and > why would I want to use it? Is it related to Model.collection.build? Perhaps you're thinking of http://api.rubyonrails.org/classes/ ActiveRecord/Errors.html#M000960. You can use

Re: [rspec-users] #add method?

2007-09-16 Thread David Chelimsky
Can you be more specific? Where have you seen such references? What did they say? Is this even an rspec question? If it's about Rails models, try the rails list. But if you do, be more specific :) On 9/16/07, David James <[EMAIL PROTECTED]> wrote: > I've seen reference to an 'add' method, as in Mo