Re: [rspec-users] Examples not getting rolled back...

2009-01-08 Thread Tero Tilus
Forgot to mention before. I'm on Rails 2.2.2 and RSpec 1.1.4. Inspired by older discussion touching this issue (see http://www.nabble.com/Database-clearing-td19572270.html) I've now got Spec::Runner.configure do |config| config.use_transactional_fixtures = false ... tables_to_truncate =

Re: [rspec-users] Examples not getting rolled back...

2009-01-08 Thread David Chelimsky
On Thu, Jan 8, 2009 at 3:56 AM, Tero Tilus t...@tilus.net wrote: Forgot to mention before. I'm on Rails 2.2.2 and RSpec 1.1.4. Aha! There's the problem. RSpec-1.1.4 was released in May and Rails 2.2.2 was released AFTER in November. I'd grab the 1.1.12 release candidates from github: gem

Re: [rspec-users] Constraints / Global requirements

2009-01-08 Thread Steve Molitor
For a more realistic example lets take the leasing application I worked on. There were lots of rules and formulas, and exceptions to those rules and formulas, and the different pieces were (sometimes) part of larger calculations. We specified the requirements in the normal declarative fashion

Re: [rspec-users] Constraints / Global requirements

2009-01-08 Thread Steve Molitor
I guess that would work. But a method would probably work too, if I'm understanding correctly (often a bad assumption!). I.e. /(.*) should be a valid date/ would call valid_date?(date), or something. Anyway, yes that sounds promising. Steve On Wed, Jan 7, 2009 at 8:09 PM, Pat Maddox

Re: [rspec-users] Constraints / Global requirements

2009-01-08 Thread Steve Molitor
I hid send to early on a previous email; please ignore it. I think you could do this with cucumber: Then email should be a result email address | date | result | | s...@foo.com | valid| | tom@| invalid | Or: Then email should be a valid email address |

Re: [rspec-users] Constraints / Global requirements

2009-01-08 Thread Steve Molitor
Whoops I misunderstood again. You'd validate that it was an instance ValidDate to make sure the date validation code was executed. Got it now. Maybe you could mock out the date validation part of the code and set an expectation that it should be called:

Re: [rspec-users] cucumber, finding a row in a table

2009-01-08 Thread James Byrne
I am still not getting this to work. Here is what I have done: In index.html.erb table id=entities caption=Entity Listing title=All Entites border=1 cellpadding=2cellspacing=6 style=width:80em; summary=This layout lists all of the entities on file and

Re: [rspec-users] Constraints / Global requirements

2009-01-08 Thread Zach Dennis
On Thu, Jan 8, 2009 at 11:32 AM, Steve Molitor stevemoli...@gmail.com wrote: I guess that would work. What would work? You top-posted, any way you can inline post to the spot you're responding to? Sorry to be an email nazi, but you're making me do all of the work for wanting to hopefully

Re: [rspec-users] cucumber, finding a row in a table

2009-01-08 Thread James Byrne
I have tried to simplify this as much as possible. To the best of my ability to determine when one selects an html element via id then one obtains the entire element contents to the termination tag. So, I did this: tr id=%=dom_id(entity, :list)% td%=h entity.entity_name.titlecase -%/td

Re: [rspec-users] Constraints / Global requirements

2009-01-08 Thread Steve Molitor
Sorry. I was responding to this from Pat Maddox: Another idea I had is to potentially introduce a ValidatedDate class, and then your should be a valid date step checks that the field is an instance of ValidatedDate. That has the affect of ensuring that people use your validation code in

[rspec-users] any eta on the rspec book?

2009-01-08 Thread Tim Walker
Subject says it all... Thanks in advance, T ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] any eta on the rspec book?

2009-01-08 Thread David Chelimsky
On Thu, Jan 8, 2009 at 1:51 PM, Tim Walker walke...@gmail.com wrote: Subject says it all... Thanks in advance, We've got a lot of momentum now. We had planned to do the beta release in December, but with holiday schedules (planned and otherwise) getting in everybody's way, that just couldn't

Re: [rspec-users] any eta on the rspec book?

2009-01-08 Thread Craig Demyanovich
Information on the book is always available here: http://pragprog.com/titles/achbd/the-rspec-book Currently, the ETA is April 2009. I'm sure that the authors will let us know if anything changes. Regards, Craig ___ rspec-users mailing list

Re: [rspec-users] any eta on the rspec book?

2009-01-08 Thread David Chelimsky
On Thu, Jan 8, 2009 at 3:27 PM, Craig Demyanovich cdemyanov...@gmail.com wrote: Information on the book is always available here: http://pragprog.com/titles/achbd/the-rspec-book Currently, the ETA is April 2009. I'm sure that the authors will let us know if anything changes. To be clear: