[rspec-users] minimise scenarios

2008-06-16 Thread aidy lewis
Hi, I have a number of scenarios that are virtually the same apart from one piece of test data Scenario: The user is returned search links with expected search text description Given a logged in xx user When clicks 'Advanced Search' And enters 'Aidy' in the Contributors field

[rspec-users] rspec book

2008-06-16 Thread Juanma Cervera
I know that David Chelimsky and Aslak Hellesøy were writing a book about rspec for the pragmatic programmers. And I hoped it would be available as a beta book. will it be? David or Aslak, I would like if you can tell us something about the book. When can we expect it to arrive? Or maybe anyone

Re: [rspec-users] rspec book

2008-06-16 Thread David Chelimsky
On Jun 16, 2008, at 6:37 AM, Juanma Cervera wrote: I know that David Chelimsky and Aslak Hellesøy were writing a book about rspec for the pragmatic programmers. And I hoped it would be available as a beta book. will it be? David or Aslak, I would like if you can tell us something about the

Re: [rspec-users] minimise scenarios

2008-06-16 Thread David Chelimsky
On Jun 16, 2008, at 6:27 AM, aidy lewis wrote: Hi, I have a number of scenarios that are virtually the same apart from one piece of test data Scenario: The user is returned search links with expected search text description Given a logged in xx user When clicks 'Advanced Search' And

Re: [rspec-users] minimise scenarios

2008-06-16 Thread aidy lewis
Thanks David, Maybe my steps are too granular and I will link them up as suggested. What I do like though is re-using steps in different domains. So I can have When clicks '$link_text' do | link_text | browser.link(:text, Regexp.new(link_text)).click end When clicks on

[rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread Andrew Selder
Hi all, I have a controller I'm trying to spec out, and I'm running into some issues with render_to_string. Basically, the show gets an array of objects, calls render_to_string for each of them, and then renders the show template. So I have the standard spec: it should render show

[rspec-users] rspec license plate

2008-06-16 Thread Daniel Barry
I was driving to my parents' house this weekend and saw this in their neighborhood: http://bakineggs.com/rspec1.jpg Whoever owns this car is awesome in my book. ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] rspec license plate

2008-06-16 Thread Al Chou
And notice that the car's red. Not ruby red, but then rubies usually aren't really the shade of red that most people think they should be. Al - Original Message From: Daniel Barry [EMAIL PROTECTED] To: rspec-users@rubyforge.org Sent: Monday, June 16, 2008 2:39:46 PM Subject:

Re: [rspec-users] rspec license plate

2008-06-16 Thread David Chelimsky
Cool! Hard to make out, but is that an Illinois plate? On Jun 16, 2008, at 4:39 PM, Daniel Barry wrote: I was driving to my parents' house this weekend and saw this in their neighborhood: http://bakineggs.com/rspec1.jpg Whoever owns this car is awesome in my book.

Re: [rspec-users] rspec license plate

2008-06-16 Thread aslak hellesoy
On Mon, Jun 16, 2008 at 11:52 PM, David Chelimsky [EMAIL PROTECTED] wrote: Cool! Hard to make out, but is that an Illinois plate? On Jun 16, 2008, at 4:39 PM, Daniel Barry wrote: Noteworthy is also that it's a muda Toyota. -It has one pending. Aslak I was driving to my parents' house this

Re: [rspec-users] Reusing story snippets

2008-06-16 Thread Jim Morris
Along similar lines is there a way to do the equivalent of before(:all) and after(:all) or after(:each) in stories? Basically I have a similar situation as above, but I need to make sure the user is logged out after each scenario. or that the user is logged in once at the start of all scenarios

Re: [rspec-users] Reusing story snippets

2008-06-16 Thread David Chelimsky
On Jun 16, 2008, at 6:18 PM, Jim Morris wrote: Along similar lines is there a way to do the equivalent of before(:all) and after(:all) or after(:each) in stories? Basically I have a similar situation as above, but I need to make sure the user is logged out after each scenario. or that the user

Re: [rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread David Chelimsky
On Jun 16, 2008, at 2:58 PM, Andrew Selder wrote: Hi all, I have a controller I'm trying to spec out, and I'm running into some issues with render_to_string. Basically, the show gets an array of objects, calls render_to_string for each of them, and then renders the show template. So I

Re: [rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread Andrew Selder
Here's the back trace 1) 'SearchesController handling GET /searches/1 should render show template' FAILED expected show, got properties/_map_info_box /Users/aselder/BostonLogic/one_system/vendor/plugins/rspec/lib/spec/ expectations.rb:52:in `fail_with'

Re: [rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread David Chelimsky
On Jun 16, 2008, at 8:59 PM, Andrew Selder wrote: Here's the back trace 1) 'SearchesController handling GET /searches/1 should render show template' FAILED expected show, got properties/_map_info_box /Users/aselder/BostonLogic/one_system/vendor/plugins/rspec/lib/spec/ expectations.rb:52:in

Re: [rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread Andrew Selder
I updated the spec to look like this: it should render show template do do_get controller.stub_render(:partial = /properties/ map_info_box, :object = anything()) response.should render_template('show') end and I still get the same failure and back trace. In addition

Re: [rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread David Chelimsky
On Jun 16, 2008, at 9:19 PM, Andrew Selder wrote: I updated the spec to look like this: it should render show template do do_get controller.stub_render(:partial = /properties/ map_info_box, :object = anything()) response.should render_template('show') end and I still