Re: [rspec-users] Reason for _spec.rb convention

2007-09-04 Thread Ashley Moran
On 3 Sep 2007, at 15:37, David Chelimsky wrote: > But it is an interesting idea that we should stay open to. Perhaps > more compelling reasons for such a change will appear in the future. I like the sound of .spec in a way. It shortens the filenames which is always a bonus for TM users. I c

Re: [rspec-users] Reason for _spec.rb convention

2007-09-04 Thread Ashley Moran
On 3 Sep 2007, at 15:03, David Chelimsky wrote: >> Not used Autotest > > You SHOULD! Why do I have a feeling I will now try it out and go WHY OH WHY DIDN'T I USE THIS BEFORE??? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge

Re: [rspec-users] Deprecating the mocking framework?

2007-09-04 Thread Jonathan Linowes
Personally, I dont want to become an expert at the range of possible testing and mocking tools. I just want a solid framework to get my work done, recommended by experts like you. And the less different components I need to install and maintain, the better. So I prefer the integrated approa

[rspec-users] specing helpers fails on restful routes

2007-09-04 Thread Surendra
Hi, I am trying to spec helper methods in a Rails project, but it seems the specs fail with the error: You might have expected an instance of Array. The error occurred while evaluating nil.<< if the restful routes helper are used either in spec files, or the helper file. What can I be doing wr

Re: [rspec-users] specing helpers fails on restful routes

2007-09-04 Thread Surendra
Nevermind, i just saw an old post mentioning the same issue. Thanks! On 9/4/07, Surendra <[EMAIL PROTECTED]> wrote: > Hi, > I am trying to spec helper methods in a Rails project, but it seems > the specs fail with the error: > > You might have expected an instance of Array. > The error occurred

Re: [rspec-users] specing helpers fails on restful routes

2007-09-04 Thread lancecarlson
Yes I was about to forward you to my blog post Sent via BlackBerry from T-Mobile -Original Message- From: Surendra <[EMAIL PROTECTED]> Date: Tue, 4 Sep 2007 17:36:52 To:rspec-users@rubyforge.org Subject: Re: [rspec-users] specing helpers fails on restful routes Nevermind, i just saw an

[rspec-users] Model Specs: Fixtures vs Mocks + Stubs?

2007-09-04 Thread Lance Carlson
What is the general opinion about fixtures versus mocking and stubbing in model specs? I heard from agile on IRC that they save the database testing for integration testing, but I also see that the caboose sample applicaiton uses fixtures. I also noticed that on the rspec site, it says "Ironically

Re: [rspec-users] Model Specs: Fixtures vs Mocks + Stubs?

2007-09-04 Thread David Chelimsky
On 9/4/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > What is the general opinion about fixtures versus mocking and stubbing > in model specs? I heard from agile on IRC that they save the database > testing for integration testing, but I also see that the caboose > sample applicaiton uses fixtures.

Re: [rspec-users] Model Specs: Fixtures vs Mocks + Stubs?

2007-09-04 Thread Lance Carlson
Ok, so to extend this issue, I'm attempting to use mocks and stubs on my model specs. I've got some questions though.. here is my code: module UserSpecHelper def mock_user(user) @user = mock_model(User) if user == :lance || user == :account_owner @user.stub!(:login).and_return('lan

Re: [rspec-users] Model Specs: Fixtures vs Mocks + Stubs?

2007-09-04 Thread Lance Carlson
Or am I to assume that rails is doing it's job and that the associations I created in my models are working as they should? On 9/4/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Ok, so to extend this issue, I'm attempting to use mocks and stubs on > my model specs. I've got some questions though..

[rspec-users] Failure Messages in RSpec

2007-09-04 Thread Geoffrey Wiseman
Having used JUnit and Test::Unit, I'm quite used to having the ability to insert a failure message, which helps when tests fail. For instance, the example RSpec that is generated for a model class specifies that the model class is valid. Assuming this were supposed to be true, and it failed, I've

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread David Chelimsky
On 9/4/07, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote: > Having used JUnit and Test::Unit, I'm quite used to having the ability to > insert a failure message, which helps when tests fail. > > For instance, the example RSpec that is generated for a model class > specifies that the model class is val

[rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread Pat Maddox
So I'd been running gem releases of rspec for the past several months, and I installed edge rspec so that I can use Story Runner. I'm running into a problem because I've got a couple rake tasks that reference "spec/rake/raketask". If I try to run "rake spec" then it pulls in the gem version inste

Re: [rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread David Chelimsky
On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > So I'd been running gem releases of rspec for the past several months, > and I installed edge rspec so that I can use Story Runner. > > I'm running into a problem because I've got a couple rake tasks that > reference "spec/rake/raketask". If I try

Re: [rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread David Richards
What I've done with this is to just uninstall the gem and commit to working off of the plugins completely. I've found that with gems in general, I try to keep them local to the project I'm on, almost as if they were a plugin. I move them to my project's lib (gem unpack) so that I've got e

[rspec-users] Failure Messages in RSpec

2007-09-04 Thread Geoffrey Wiseman
> > I come from the same background as you, so I hear where you're coming > from. We made a conscious decision, however, not to support custom > messages almost two years ago and I'm not sure if its ever even come > up before. If it has, it was a long time ago. [nod] Perhaps as I get into the mi

Re: [rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread Pat Maddox
On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > So I'd been running gem releases of rspec for the past several months, > > and I installed edge rspec so that I can use Story Runner. > > > > I'm running into a problem because I've got a co

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Shane Mingins
On 5/09/2007, at 8:51 AM, Geoffrey Wiseman wrote: Using this as an example, if a new validation rule is added, this test will fail without indicating /why/. Sure, I can get that answer in other ways, but I'd hate to discover things like: it "should be valid with valid attributes" do #

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread David Chelimsky
On 9/4/07, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote: > > I come from the same background as you, so I hear where you're coming > > from. We made a conscious decision, however, not to support custom > > messages almost two years ago and I'm not sure if its ever even come > > up before. If it has,

Re: [rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread David Chelimsky
On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > > So I'd been running gem releases of rspec for the past several months, > > > and I installed edge rspec so that I can use Story Runner.

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Jay Levitt
Shane Mingins wrote: > > On 5/09/2007, at 8:51 AM, Geoffrey Wiseman wrote: > >> >> Using this as an example, if a new validation rule is added, this test >> will fail without indicating /why/. Sure, I can get that answer in >> other ways, but I'd hate to discover things like: >> >> it "should

Re: [rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread Pat Maddox
On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > > > So I'd been running gem releases of rspec for the past several months, >

Re: [rspec-users] Rake tasks getting in the way of edge (uses gem instead)

2007-09-04 Thread David Chelimsky
On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > > On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > > On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > > > > > So I'd been ru

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Chad Humphries
I generally write custom expectation matchers when I want more specific information on failure scenarios. Granted this might not work in all scenarios (taking time to write a custom matcher I mean), but for most things it has made it very nice. -Chad On Sep 4, 2007, at 5:08 PM, Jay Levitt

[rspec-users] A place for modules

2007-09-04 Thread Lance Carlson
At the moment I'm including files from the root of my spec directory so I don't touch my spec_helper.rb file because it seems to change every once in awhile when rspec gets upgraded. I think it would be good if we had a place to put modules, perhaps a file that got auto-loaded so you could include

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Jay Levitt
Chad Humphries wrote: > I generally write custom expectation matchers when I want more > specific information on failure scenarios. Granted this might not > work in all scenarios (taking time to write a custom matcher I mean), > but for most things it has made it very nice. Hmm, I wonder if

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Pat Maddox
On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 9/4/07, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote: > > > I come from the same background as you, so I hear where you're coming > > > from. We made a conscious decision, however, not to support custom > > > messages almost two years ago and

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread David Chelimsky
On 9/4/07, Pat Maddox <[EMAIL PROTECTED]> wrote: > On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 9/4/07, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote: > > > > I come from the same background as you, so I hear where you're coming > > > > from. We made a conscious decision, however, not

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Geoffrey Wiseman
On 9/4/07, Jay Levitt <[EMAIL PROTECTED]> wrote: > > Seems like, in this case, he'd output @person.errors in his message so > he could see *why* person was invalid; the "puts" is his current > hack-around for the lack of custom messages. > > Not a bad idea, really. (the custom messages, not the ha

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Ben Mabey
Pat Maddox wrote: > On 9/4/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > >> On 9/4/07, Geoffrey Wiseman <[EMAIL PROTECTED]> wrote: >> I come from the same background as you, so I hear where you're coming from. We made a conscious decision, however, not to support custom me

Re: [rspec-users] 1.05 to 1.08

2007-09-04 Thread Shane Mingins
On 4/09/2007, at 3:44 PM, David Chelimsky wrote: > > I am going to guess that it's something like this: > > You have a nil object when you didn't expect it! > You might have expected an instance of Array. > The error occurred while evaluating nil.<< > > If not, please post the error (good idea to

Re: [rspec-users] 1.05 to 1.08

2007-09-04 Thread David Chelimsky
On 9/4/07, Shane Mingins <[EMAIL PROTECTED]> wrote: > > On 4/09/2007, at 3:44 PM, David Chelimsky wrote: > > > > > I am going to guess that it's something like this: > > > > You have a nil object when you didn't expect it! > > You might have expected an instance of Array. > > The error occurred whi

Re: [rspec-users] 1.05 to 1.08

2007-09-04 Thread Shane Mingins
On 5/09/2007, at 10:00 AM, David Chelimsky wrote: > This looks like the same error - can you run just the file w/ this > spec like this: > > spec path/to/file.rb -b > > That'll produce the full backtrace. > > Thanks Yeah it does look similar (I was reading the bug report last night) You have a

Re: [rspec-users] Reason for _spec.rb convention

2007-09-04 Thread Dan North
Ashley Moran wrote: On 3 Sep 2007, at 15:37, David Chelimsky wrote: But it is an interesting idea that we should stay open to. Perhaps more compelling reasons for such a change will appear in the future. I like the sound of .spec in a way. It shortens the filenames which is always

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Luis Lavena
On 9/4/07, Ben Mabey <[EMAIL PROTECTED]> wrote: > Maybe this is what your thinking? > > http://opensoul.org/2007/4/18/rspec-model-should-be_valid > That should be the default matcher for be_valid... I use that and help me pinpoint some brittle specs (all related to new attributes added later in th