Re: [rspec-users] Reusing story snippets

2008-06-16 Thread Jim Morris
I'm not using Rails, I am doing end to end integration testing talking to the server via net/http, so RailsStory is not involved. I think the listeners may do it, I can use story_started like before(:all) and story_ended like after(:all) which will be great, presuming story_ended is always called

Re: [rspec-users] render_to_string confusing ControllerSpec

2008-06-16 Thread Andrew Selder
David, Valid point about the method needing some refactoring. But another key rule of refactoring is to have passing tests before refactoring. This is one of the things that's a minor annoyance I have about rails, you can't associate views with models. The problem with the refactoring sug

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 sti

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 add

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

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' /Users/aselder/BostonLogic/one_syste

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 h

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] 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 th

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

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 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: [rspec

[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 http://rubyforge.org/mailman/listinfo

[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

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 '$button_val

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 ente

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 b

[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 k

[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 An