[rspec-users] [Cucumber] Hi-res logo?

2009-02-19 Thread Ben Mabey
I'm hoping that the designer (or the co-worker programmer) who won the Cucumber logo contest will see this message... I'm looking for a hi-res or vector-based version of the Cucumber logo for use in a presentation. If the image is not vector based then a hi-res version with a transparent

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Matt Wynne
On 19 Feb 2009, at 05:40, Stephen Eley wrote: On Wed, Feb 18, 2009 at 11:42 PM, Yi Wen hayafi...@gmail.com wrote: Without this syntax sugar, we still have to test validates_presence_of to make sure it's there and won't broken, right? Wrong. You don't have to test validates_presence_of.

Re: [rspec-users] [Cucumber] Hi-res logo?

2009-02-19 Thread aslak hellesoy
On Thu, Feb 19, 2009 at 8:46 AM, Ben Mabey b...@benmabey.com wrote: I'm hoping that the designer (or the co-worker programmer) who won the Cucumber logo contest will see this message... I'm looking for a hi-res or vector-based version of the Cucumber logo for use in a presentation. If the

Re: [rspec-users] [ANN] rspec-1.2 release candidate

2009-02-19 Thread Wincent Colaiuta
El 19/2/2009, a las 7:56, David Chelimsky dchelim...@gmail.com escribió: rspec-1.2 and rspec-rails-1.2 are just about ready, but I'd like to get some feedback from the field before the release. Would the adventurous among you kindly grab the latest github gems (1.1.99.7 as of this email) and

Re: [rspec-users] Cucumber + Webrat + Selenium + ActionMailer

2009-02-19 Thread Raimond Garcia
Thanks guys, very interesting points. As a good collegue of mine says, its all about trade offs :) I agree with changing your production code to make it more testable, definitely, especially early on in the development process, once your site is up and running it would have to be done with

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Fernando Perez
Wrong. You don't have to test validates_presence_of. What matters, and therefore what you should test, is whether the model will complain at you if a particular value is left empty. ... If your spec breaks because you changed a method call, you're not testing behavior any more. You're

Re: [rspec-users] [ANN] rspec-1.2 release candidate

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 3:57 AM, Wincent Colaiuta w...@wincent.com wrote: El 19/2/2009, a las 7:56, David Chelimsky dchelim...@gmail.com escribió: rspec-1.2 and rspec-rails-1.2 are just about ready, but I'd like to get some feedback from the field before the release. Would the adventurous

Re: [rspec-users] Ruby 1.9 - autospec loadpath problem

2009-02-19 Thread lasitha
On Mon, Dec 01, 2008 at 03:51pm, David Chelimsky dchelim...@gmail.com wrote: On Sun, Nov 30, 2008 at 4:24 PM, Mikel Lindsaar raasd...@gmail.com wrote: [...] mi...@baci.local ~/ruby_programs/mail $ autospec /usr/local/bin/autotest:19:in `load': Is a directory -

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Mike Gaffney
Dave, you make a good point. In our system, where we are converting a legacy database/application, we typically have no user stories and have the technical (or you could argue user) requirement that the database logic / constraints get converted. This is where we are typically just encoding

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Stephen Eley
On Thu, Feb 19, 2009 at 12:58 AM, David Chelimsky dchelim...@gmail.com wrote: Also, while I used to be very anal and write should have(1).error_on(:login) and such, I eventually realized that there's no point. Checking on 'valid?' is entire and sufficient. I think this depends on whether or

Re: [rspec-users] [ANN] rspec-1.2 release candidate

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 12:56 AM, David Chelimsky dchelim...@gmail.com wrote: Hey fellow behaviour-drivers, rspec-1.2 and rspec-rails-1.2 are just about ready, but I'd like to get some feedback from the field before the release. Would the adventurous among you kindly grab the latest github

Re: [rspec-users] validate_presence_of

2009-02-19 Thread David Chelimsky
On Wed, Feb 18, 2009 at 11:40 PM, Stephen Eley sfe...@gmail.com wrote: deliberately_out_of_context_to_make_a_point If your spec breaks because you changed a method call, you're not testing behavior any more. You're testing syntax. /deliberately_out_of_context_to_make_a_point We've got to stop

Re: [rspec-users] Cucumber + Webrat + Selenium + ActionMailer

2009-02-19 Thread Raimond Garcia
1. http://seattlerb.rubyforge.org/ar_mailer/classes/ActionMailer/ARMailer.html P.S. I'll follow up with a confirmation post just to let the people know how it worked out for us with ARMailer. Yeap everything worked like a charm, once again checking email contents like there is no tomorrow

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Zach Dennis
On Thu, Feb 19, 2009 at 12:31 AM, Stephen Eley sfe...@gmail.com wrote: On Wed, Feb 18, 2009 at 10:42 PM, Mark Wilden m...@mwilden.com wrote: On Wed, Feb 18, 2009 at 4:39 PM, Fernando Perez li...@ruby-forum.com wrote: What's the point in testing validates_presence_of for a model? To make sure

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Yi Wen
Good point, that's actually I am debating with myself everyday and haven't got a clear answer. This is classical calssic unit tester vs. mockist war. :) Talking about this case: 1. I haven't checked how should valite_presence_of is implemented, but it could pretty much be checking if the value

Re: [rspec-users] validate_presence_of

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 8:20 AM, Stephen Eley sfe...@gmail.com wrote: On Thu, Feb 19, 2009 at 12:58 AM, David Chelimsky dchelim...@gmail.com wrote: Also, while I used to be very anal and write should have(1).error_on(:login) and such, I eventually realized that there's no point. Checking

[rspec-users] Cucumber 0.2 final release date?

2009-02-19 Thread aidy lewis
Hi, I know this seems all take and no give, but do we have an estimated final release date for Cucumber 0.2? Thanks Aidy Celerity, Cucumber and Firewatir: http://skillsmatter.com/event/ruby-on-rails/lrug-march ___ rspec-users mailing list

Re: [rspec-users] [Cucumber] Level of features / Feature dependent steps

2009-02-19 Thread Lenny Marks
Just wanted to thank everyone for their replies. I actually recall that thread now about imperative vs. declarative. I've just re-read Ben's post along with some of the linked content off the post and now and I feel a bit more comfortable with the direction I was going in. I personally

Re: [rspec-users] Ruby 1.9 - autospec loadpath problem

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 8:52 AM, lasitha lasitha.ranatu...@gmail.com wrote: On Mon, Dec 01, 2008 at 03:51pm, David Chelimsky dchelim...@gmail.com wrote: On Sun, Nov 30, 2008 at 4:24 PM, Mikel Lindsaar raasd...@gmail.com wrote: [...] mi...@baci.local ~/ruby_programs/mail $ autospec

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Stephen Eley
On Thu, Feb 19, 2009 at 12:15 PM, Stephen Eley sfe...@gmail.com wrote: But I did not write any code yet setting the message. Because I haven't written any tests for the message. At this point I don't care what the message is, just that I have the right data. I care about the message when I

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Mark Wilden
On Wed, Feb 18, 2009 at 9:40 PM, Stephen Eley sfe...@gmail.com wrote: On Wed, Feb 18, 2009 at 11:42 PM, Yi Wen hayafi...@gmail.com wrote: validates_presence_of happens to be the name of the method in ActiveRecord that does that. But if you decide to write your own

Re: [rspec-users] validate_presence_of

2009-02-19 Thread Stephen Eley
On Thu, Feb 19, 2009 at 10:55 AM, David Chelimsky dchelim...@gmail.com wrote: This is where this all gets tricky. Yep. 8- TDD (remember? that's where this all started) says you don't write any subject code without a failing *unit test*. This is not about the end result - it's about a

Re: [rspec-users] validate_presence_of

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 11:38 AM, Mark Wilden m...@mwilden.com wrote: On Wed, Feb 18, 2009 at 9:40 PM, Stephen Eley sfe...@gmail.com wrote: On Wed, Feb 18, 2009 at 11:42 PM, Yi Wen hayafi...@gmail.com wrote: validates_presence_of happens to be the name of the method in ActiveRecord that does

[rspec-users] ActiveRecord::Base.should_receive(:find) fails

2009-02-19 Thread Tero Tilus
I've got an AR-model with some find-magic I want to test. When I have ActiveRecord::Base.should_receive(:find).with(anything(),assert_options) MyModel.find(:all,find_options) in my example find-method somehow disappears alltogether and I get NoMethodError in 'MyModel find-options are

Re: [rspec-users] ActiveRecord::Base.should_receive(:find) fails

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 12:34 PM, Tero Tilus t...@tilus.net wrote: I've got an AR-model with some find-magic I want to test. When I have ActiveRecord::Base.should_receive(:find).with(anything(),assert_options) MyModel.find(:all,find_options) MyModel != ActiveRecord::Base Try this

[rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Martin
Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone point me please to an example where I can see how to mock my model and stub all methods needed for the view?

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Matt Wynne
On 19 Feb 2009, at 20:54, Martin wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone point me please to an example where I can see how to mock my model

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Bart Zonneveld
On 19 feb 2009, at 21:54, Martin wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone point me please to an example where I can see how to mock my model

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Jim Gay
On Feb 19, 2009, at 3:54 PM, Martin wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone point me please to an example where I can see how to mock my model

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread David Chelimsky
On Thu, Feb 19, 2009 at 2:54 PM, Martin html-k...@gmx.de wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone point me please to an example where I can see how

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Zach Dennis
On Thu, Feb 19, 2009 at 4:24 PM, Matt Wynne m...@mattwynne.net wrote: On 19 Feb 2009, at 20:54, Martin wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Zach Dennis
On Thu, Feb 19, 2009 at 3:54 PM, Martin html-k...@gmx.de wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank and so on). Can someone point me please to an example where I can see how

Re: [rspec-users] Mocking / stubbing errors for ActiveRecord

2009-02-19 Thread Zach Dennis
On Thu, Feb 19, 2009 at 4:51 PM, Zach Dennis zach.den...@gmail.com wrote: On Thu, Feb 19, 2009 at 3:54 PM, Martin html-k...@gmx.de wrote: Hi, I'm trying to test my views using rspec. I want to test my edit- and new-view also for the case an error occurs (something like title can't be blank