[rspec-users] [Cucumber] Tabular data in steps

2009-01-29 Thread Juanma Cervera
Is it possible to mix a normal parameter argument for a step, with tabular data? Something like this: Given there is a country Spain with the cities: |name | |Madrid| |Barcelona | |Valencia | And this step_definition Given /^there is a country Spain with the cities:$/ do

Re: [rspec-users] [Cucumber] Tabular data in steps

2009-01-29 Thread Erik Pukinskis
Yes, that should work. But you'd have to do Given /^there is a country (.*) with the cities:$/ do |country_name, cities_table| ... end Erik On Thu, Jan 29, 2009 at 12:47 AM, Juanma Cervera li...@ruby-forum.com wrote: Is it possible to mix a normal parameter argument for a step, with tabular

Re: [rspec-users] [Cucumber] Tabular data in steps

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 10:37 AM, Erik Pukinskis erikpukins...@gmail.com wrote: Yes, that should work. But you'd have to do Given /^there is a country (.*) with the cities:$/ do |country_name, cities_table| ... end Correct. And it's documented in the Wiki:

Re: [rspec-users] [Cucumber] Tabular data in steps

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 12:29 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Thu, Jan 29, 2009 at 10:37 AM, Erik Pukinskis erikpukins...@gmail.com wrote: Yes, that should work. But you'd have to do Given /^there is a country (.*) with the cities:$/ do |country_name, cities_table|

[rspec-users] [Cucumber] cucumber command does not work in db transaction

2009-01-29 Thread Juanma Cervera
I am working in an scenario and it's still failing. I have not yet finished it. And I am running it constantly with the cucumber command, not with rake. The problem is that it's not working with the database in a transaction, and I have to run 'rake db:test:prepare' manually between two

Re: [rspec-users] [Cucumber] Tabular data in steps

2009-01-29 Thread Juanma Cervera
Aslak The documentation in this wiki is the best I have ever seen, and it's constantly being improved. Very good job and thanks. Juanma -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] [Cucumber] cucumber command does not work in db transaction

2009-01-29 Thread Joseph Wilk
Juanma Cervera wrote: I am working in an scenario and it's still failing. I have not yet finished it. And I am running it constantly with the cucumber command, not with rake. The problem is that it's not working with the database in a transaction, and I have to run 'rake db:test:prepare'

Re: [rspec-users] [Cucumber] cucumber command does not work in db transaction

2009-01-29 Thread Joseph Wilk
Woops, sorry I meant: @@@ Cucumber::Rails.use_transactional_fixtures @@@ Joseph Wilk wrote: Juanma Cervera wrote: I am working in an scenario and it's still failing. I have not yet finished it. And I am running it constantly with the cucumber command, not with rake. The problem is that it's

Re: [rspec-users] [Cucumber] cucumber command does not work in db transaction

2009-01-29 Thread Juanma Cervera
Joseph Wilk wrote: Woops, sorry I meant: @@@ Cucumber::Rails.use_transactional_fixtures @@@ Joseph, thanks for the reply. I do have Cucumber::Rails.use_transactional_fixtures in env.rb I have verified it failing when setting the database in the new background section of the feature. In

Re: [rspec-users] [Cucumber] cucumber command does not work in db transaction

2009-01-29 Thread Juanma Cervera
For now I am running this command (together) rake db:test:prepare cucumber -r features -l es features/reservas/creacion_reserva.feature Juanma -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] [Cucumber] cucumber command does not work in db transaction

2009-01-29 Thread Joseph Wilk
Ben Mabey wrote: Juanma Cervera wrote: Joseph Wilk wrote: Woops, sorry I meant: @@@ Cucumber::Rails.use_transactional_fixtures @@@ Joseph, thanks for the reply. I do have Cucumber::Rails.use_transactional_fixtures in env.rb I have verified it failing when setting the database in

[rspec-users] [ANN] At last, the book

2009-01-29 Thread Juanma Cervera
I have just gone to Pragmatic Programmers and spent my money in the book I have dreaming for six months. :) Maybe I'm the first :) -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org

[rspec-users] [ANN] The RSpec Book is now in beta

2009-01-29 Thread David Chelimsky
I’m pleased to announce the beta release of the Pragmatic Bookshelf’s The RSpec Book: Behaviour Driven Development with RSpec, Cucumber and Friends! It’s been a long time coming, and there’s still a lot of work to do to get to print. The beta release has 9 of the 22 chapters we have

Re: [rspec-users] [ANN] At last, the book

2009-01-29 Thread Maurício Linhares
No, you're not ;P Hope it's really launched in April \o/ - Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) On Thu, Jan 29, 2009 at 12:10 PM, Juanma Cervera li...@ruby-forum.com wrote: I have just gone to Pragmatic Programmers and spent my money in

Re: [rspec-users] [ANN] The RSpec Book is now in beta

2009-01-29 Thread Nick Hoffman
On 29/01/2009, at 10:36 AM, David Chelimsky wrote: I’m pleased to announce the beta release of the Pragmatic Bookshelf’s The RSpec Book: Behaviour Driven Development with RSpec, Cucumber and Friends! It’s been a long time coming, and there’s still a lot of work to do to get to print. The

Re: [rspec-users] [ANN] At last, the book

2009-01-29 Thread Erik Terpstra
Just did the same :) Juanma Cervera wrote: I have just gone to Pragmatic Programmers and spent my money in the book I have dreaming for six months. :) Maybe I'm the first :) ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] [ANN] The RSpec Book is now in beta

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 9:55 AM, Nick Hoffman n...@deadorange.com wrote: On 29/01/2009, at 10:36 AM, David Chelimsky wrote: I'm pleased to announce the beta release of the Pragmatic Bookshelf's The RSpec Book: Behaviour Driven Development with RSpec, Cucumber and Friends! It's been a long

Re: [rspec-users] [ANN] At last, the book

2009-01-29 Thread Tim Walker
Dang, I tried to create a spiffy new application and ended up with a strangely shaped farm implement instead. 8) Nice work guys. Sincerely, T On Thu, Jan 29, 2009 at 8:35 AM, Erik Terpstra e...@solidcode.net wrote: Just did the same :) Juanma Cervera wrote: I have just gone to Pragmatic

Re: [rspec-users] [ANN] The RSpec Book is now in beta

2009-01-29 Thread doug livesey
Just bought it -- been looking forwards to this! 2009/1/29 David Chelimsky dchelim...@gmail.com On Thu, Jan 29, 2009 at 9:55 AM, Nick Hoffman n...@deadorange.com wrote: On 29/01/2009, at 10:36 AM, David Chelimsky wrote: I'm pleased to announce the beta release of the Pragmatic Bookshelf's

[rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread r_j_h_box-sf
Hi all, I've found myself writing a thing I think is less than optimal, looking for suggestions. The context is, I'm testing a result, and as a part of that test, I might verify two or three things, which are individually relevant but not really discrete results (?). Here's my thinking

[rspec-users] Strange message expectation behaviour with Time.now in a find condition

2009-01-29 Thread tatyree
Even if this is a bug, it's a pretty obscure one. It was frustrating the hell out of me until I found a workaround, so I thought I'd just post the details: Given a find like this: def self.find_old User.all(:conditions = ['updated_at = ?',Time.now - 1.day) ... Trying to set a message

Re: [rspec-users] Strange message expectation behaviour with Time.now in a find condition

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 7:08 PM, tatyree t...@snappl.co.uk wrote: Even if this is a bug, it's a pretty obscure one. It was frustrating the hell out of me until I found a workaround, so I thought I'd just post the details: Given a find like this: def self.find_old User.all(:conditions =

Re: [rspec-users] Strange message expectation behaviour with Time.now in a find condition

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 12:08 PM, tatyree t...@snappl.co.uk wrote: Even if this is a bug, it's a pretty obscure one. It was frustrating the hell out of me until I found a workaround, so I thought I'd just post the details: Given a find like this: def self.find_old User.all(:conditions =

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 12:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've found myself writing a thing I think is less than optimal, looking for suggestions. The context is, I'm testing a result, and as a part of that test, I might verify two or three things, which are individually

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread Nick Hoffman
On 29/01/2009, at 1:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've found myself writing a thing I think is less than optimal, looking for suggestions. The context is, I'm testing a result, and as a part of that test, I might verify two or three things, which are individually relevant

[rspec-users] session vs. controller.session

2009-01-29 Thread Scott Taylor
What exactly is the difference between using controller.session and session? I though that session was just a proxy controller.session, but this irb/debug sessions show that it isn't: http://gist.github.com/54673 When I call reset_session in the controller, I'm seeing the controller's

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 7:25 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 12:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've found myself writing a thing I think is less than optimal, looking for suggestions. The context is, I'm testing a result, and as a part

Re: [rspec-users] Strange message expectation behaviour with Time.now in a find condition

2009-01-29 Thread Nick Hoffman
On 29/01/2009, at 1:41 PM, David Chelimsky wrote: On Thu, Jan 29, 2009 at 12:08 PM, tatyree t...@snappl.co.uk wrote: Even if this is a bug, it's a pretty obscure one. It was frustrating the hell out of me until I found a workaround, so I thought I'd just post the details: Given a find like

[rspec-users] [Cucumber] two running formats

2009-01-29 Thread aidy lewis
Hi, Is it possible to run the html and console formatting concurrently in Cucumber? Thanks Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 1:02 PM, aslak hellesoy aslak.helle...@gmail.comwrote: On Thu, Jan 29, 2009 at 7:25 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 12:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've found myself writing a thing I think is less

[rspec-users] Rspec beta book documenting errors

2009-01-29 Thread aidy lewis
Hi, Where should we be documenting errors in the Rspec beta book? Thanks Aidy ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rspec beta book documenting errors

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 8:36 PM, aidy lewis aidy.le...@googlemail.com wrote: Hi, Where should we be documenting errors in the Rspec beta book? There is an Errata link on the main book page that points here: http://www.pragprog.com/titles/achbd/errata Aslak Thanks Aidy

Re: [rspec-users] [Cucumber] two running formats

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 8:21 PM, aidy lewis aidy.le...@googlemail.com wrote: Hi, Is it possible to run the html and console formatting concurrently in Cucumber? It should be, yes. Check --help for details. Are you running into any issues? Aslak Thanks Aidy

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 8:18 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 1:02 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Thu, Jan 29, 2009 at 7:25 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 12:00 PM,

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread Nick Hoffman
On 29/01/2009, at 2:18 PM, David Chelimsky wrote: On Thu, Jan 29, 2009 at 1:02 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Thu, Jan 29, 2009 at 7:25 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 12:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 2:38 PM, Nick Hoffman n...@deadorange.com wrote: On 29/01/2009, at 2:18 PM, David Chelimsky wrote: On Thu, Jan 29, 2009 at 1:02 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Thu, Jan 29, 2009 at 7:25 PM, David Chelimsky dchelim...@gmail.com wrote: On

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread aslak hellesoy
On Thu, Jan 29, 2009 at 10:14 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 2:38 PM, Nick Hoffman n...@deadorange.com wrote: On 29/01/2009, at 2:18 PM, David Chelimsky wrote: On Thu, Jan 29, 2009 at 1:02 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Thu, Jan

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread Nick Hoffman
On 29/01/2009, at 4:27 PM, aslak hellesoy wrote: On Thu, Jan 29, 2009 at 10:14 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 2:38 PM, Nick Hoffman n...@deadorange.com wrote: I like on_failure, as it's consistent with RSpec's output. Eg: 31 examples, 0 failures What

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 3:27 PM, aslak hellesoy aslak.helle...@gmail.com wrote: On Thu, Jan 29, 2009 at 10:14 PM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 2:38 PM, Nick Hoffman n...@deadorange.com wrote: On 29/01/2009, at 2:18 PM, David Chelimsky wrote: On Thu,

Re: [rspec-users] session vs. controller.session

2009-01-29 Thread Scott Taylor
On Jan 29, 2009, at 1:57 PM, Scott Taylor wrote: What exactly is the difference between using controller.session and session? I though that session was just a proxy controller.session, but this irb/debug sessions show that it isn't: http://gist.github.com/54673 When I call

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread r_j_h_box-sf
I'm starting to wonder if this is a good idea to begin with. I had started to suggest nested it()s: it ... do it something more do end end ... but it's already handled by the existing nested describe(), before(), it() system. I guess if we were shooting for flexibility, we might ask

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread r_j_h_box-sf
I do like try_to do...end.or_report - much better for the case where I'm not trying to generate documentation. I'm not sure it works so well for the case where I want to generate an extra element of documentation, though this might be just an implementation detail. .or_report .or_document

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 3:50 PM, r_j_h_box...@yahoo.com wrote: I'm starting to wonder if this is a good idea to begin with. I had started to suggest nested it()s: it ... do it something more do end end ... but it's already handled by the existing nested describe(), before(), it()

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-29 Thread James Byrne
Ben Mabey wrote: You can then use the dummy AR classes in your specs with an in-memory DB. I hope that helps, Ben Oh, yes. very much. Especially this example. def setup_db ActiveRecord::Schema.define(:version = 1) do Have you, or anyone reading this, had any experience with the

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread Matt Wynne
On 29 Jan 2009, at 22:20, David Chelimsky wrote: On Thu, Jan 29, 2009 at 3:50 PM, r_j_h_box...@yahoo.com wrote: On Thu, Jan 29, 2009 at 12:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've found myself writing a thing I think is less than optimal, looking for suggestions. The context

Re: [rspec-users] simple == with prettier error messages + good documentation

2009-01-29 Thread David Chelimsky
On Thu, Jan 29, 2009 at 6:07 PM, Matt Wynne m...@mattwynne.net wrote: On 29 Jan 2009, at 22:20, David Chelimsky wrote: On Thu, Jan 29, 2009 at 3:50 PM, r_j_h_box...@yahoo.com wrote: On Thu, Jan 29, 2009 at 12:00 PM, r_j_h_box...@yahoo.com wrote: Hi all, I've found myself writing a thing

Re: [rspec-users] Strange message expectation behaviour with Time.now in a find condition

2009-01-29 Thread Pat Maddox
On Thu, Jan 29, 2009 at 10:41 AM, David Chelimsky dchelim...@gmail.com wrote: On Thu, Jan 29, 2009 at 12:08 PM, tatyree t...@snappl.co.uk wrote: Even if this is a bug, it's a pretty obscure one. It was frustrating the hell out of me until I found a workaround, so I thought I'd just post

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-29 Thread Ben Mabey
James Byrne wrote: Ben Mabey wrote: You can then use the dummy AR classes in your specs with an in-memory DB. I hope that helps, Ben Oh, yes. very much. Especially this example. def setup_db ActiveRecord::Schema.define(:version = 1) do Have you, or anyone reading

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-29 Thread Pat Nakajima
(Sorry if this is double-posted, I was having trouble with joining the list) If you want an easy way to test ActiveRecord extensions, check out acts_as_fu: http://github.com/nakajima/acts_as_fu. It makes generating ActiveRecord models dead simple. Pat On Jan 29, 10:18 pm, Ben Mabey

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-29 Thread Ben Mabey
Pat Nakajima wrote: (Sorry if this is double-posted, I was having trouble with joining the list) If you want an easy way to test ActiveRecord extensions, check out acts_as_fu: http://github.com/nakajima/acts_as_fu. It makes generating ActiveRecord models dead simple. Pat Very slick. I'll