From biot023 at gmail.com Thu Jul 8 05:36:27 2010 From: biot023 at gmail.com (doug livesey) Date: Thu, 8 Jul 2010 10:36:27 +0100 Subject: [Cells-talk] How are people speccing their cells code? Message-ID: Hi -- I just started using cells yesterday, and I *love* it! I'm imagining all sorts of uses for it -- in fact my imagination might be going a little overboard at the moment, maybe I should lie down with a cold compress. Anyway, I was wondering if the mailing list had anyone on it who is using cells with rspec, and how they are doing that, if it has. I've got a 'controller' bit of a cell specced (but not too prettily), but am struggling at the moment with the 'view' bit. Anyway, I'll keep on experimenting, and thanks very much for an amazing gem -- I'm well impressed! Oh, and I'm using Rails 3, RSpec 2, and the latest from github for Cells. Cheers, Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From apotonick at gmail.com Fri Jul 9 05:48:02 2010 From: apotonick at gmail.com (Nick Sutterer) Date: Fri, 9 Jul 2010 11:48:02 +0200 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: Doug- great you like Cells! Don't be scared if your imagination goes Crazy, you can use that framework to solve a bunch of different problems. Be sure to check out Apotomo as well, which is based on Cells: http://apotomo.de/ Specing Cells is something I kept postponing as I don't know RSpec really good. Blake did some stuff, look here: http://github.com/blakewatters/cells We can definitly compile your requirements and integrate that into the lib, just tell us what you need. Is the Rails 3 version running stable so far? Cheers, Nick On Thu, Jul 8, 2010 at 11:36 AM, doug livesey wrote: > Hi -- I just started using cells yesterday, and I *love* it! > I'm imagining all sorts of uses for it -- in fact my imagination might be > going a little overboard at the moment, maybe I should lie down with a cold > compress. > Anyway, I was wondering if the mailing list had anyone on it who is using > cells with rspec, and how they are doing that, if it has. > I've got a 'controller' bit of a cell specced (but not too prettily), but am > struggling at the moment with the 'view' bit. > Anyway, I'll keep on experimenting, and thanks very much for an amazing gem > -- I'm well impressed! > Oh, and I'm using Rails 3, RSpec 2, and the latest from github for Cells. > Cheers, > ?? Doug. > _______________________________________________ > Cells-talk mailing list > Cells-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/cells-talk > > From blakewatters at gmail.com Fri Jul 9 08:03:24 2010 From: blakewatters at gmail.com (Blake Watters) Date: Fri, 9 Jul 2010 08:03:24 -0400 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: The project I used Cells heavily in has gone into life support mode over the last year. I am not actively maintaining that port, but am around if here are any issues with the spec infrastructure. On Fri, Jul 9, 2010 at 5:48 AM, Nick Sutterer wrote: > Doug- > great you like Cells! Don't be scared if your imagination goes Crazy, > you can use that framework to solve a bunch of different problems. Be > sure to check out Apotomo as well, which is based on Cells: > http://apotomo.de/ > > Specing Cells is something I kept postponing as I don't know RSpec > really good. Blake did some stuff, look here: > http://github.com/blakewatters/cells > > We can definitly compile your requirements and integrate that into the > lib, just tell us what you need. > > Is the Rails 3 version running stable so far? > > Cheers, > Nick > > On Thu, Jul 8, 2010 at 11:36 AM, doug livesey wrote: > > Hi -- I just started using cells yesterday, and I *love* it! > > I'm imagining all sorts of uses for it -- in fact my imagination might be > > going a little overboard at the moment, maybe I should lie down with a > cold > > compress. > > Anyway, I was wondering if the mailing list had anyone on it who is using > > cells with rspec, and how they are doing that, if it has. > > I've got a 'controller' bit of a cell specced (but not too prettily), but > am > > struggling at the moment with the 'view' bit. > > Anyway, I'll keep on experimenting, and thanks very much for an amazing > gem > > -- I'm well impressed! > > Oh, and I'm using Rails 3, RSpec 2, and the latest from github for Cells. > > Cheers, > > Doug. > > _______________________________________________ > > Cells-talk mailing list > > Cells-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/cells-talk > > > > > _______________________________________________ > Cells-talk mailing list > Cells-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/cells-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kjvarga at gmail.com Fri Jul 9 14:46:02 2010 From: kjvarga at gmail.com (Karl Varga) Date: Fri, 9 Jul 2010 11:46:02 -0700 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: This is a long shot, but rspec has view specs, so I wonder if those ExampleGroups (or whatever rspec calls them) can be borrowed to test the result of your cells states. Cells of course returns HTML fragments...or JSON, or YAML or whatever you want so it depends on how crazy you want to get :) On Thu, Jul 8, 2010 at 2:36 AM, doug livesey wrote: > Hi -- I just started using cells yesterday, and I *love* it! > I'm imagining all sorts of uses for it -- in fact my imagination might be > going a little overboard at the moment, maybe I should lie down with a cold > compress. > Anyway, I was wondering if the mailing list had anyone on it who is using > cells with rspec, and how they are doing that, if it has. > I've got a 'controller' bit of a cell specced (but not too prettily), but > am struggling at the moment with the 'view' bit. > Anyway, I'll keep on experimenting, and thanks very much for an amazing gem > -- I'm well impressed! > Oh, and I'm using Rails 3, RSpec 2, and the latest from github for Cells. > Cheers, > Doug. > > _______________________________________________ > Cells-talk mailing list > Cells-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/cells-talk > > -- Karl Varga e: kjvarga at gmail.com w: kjvarga.blogspot.com c: +1.250.884.9895 Skype: kjvarga -------------- next part -------------- An HTML attachment was scrubbed... URL: From kjvarga at gmail.com Fri Jul 9 14:53:19 2010 From: kjvarga at gmail.com (Karl Varga) Date: Fri, 9 Jul 2010 11:53:19 -0700 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: Personally I'd be inclined to use an rspec integration session (in spec/integration/) and manually instantiate my Cells (or using some spec/support/ helpers) using a mock controller. Then you can do asserts on your cell object and inspect the return values. I've used a MockController to render Cells in Rails Metal and it's working really nicely (with url helpers and controller helpers). That was for Rails 2.3.* but I think I know how I'd do if for Rails 3. Cheers, Karl On Fri, Jul 9, 2010 at 11:46 AM, Karl Varga wrote: > This is a long shot, but rspec has view specs, so I wonder if those > ExampleGroups (or whatever rspec calls them) can be borrowed to test the > result of your cells states. > > Cells of course returns HTML fragments...or JSON, or YAML or whatever you > want so it depends on how crazy you want to get :) > > On Thu, Jul 8, 2010 at 2:36 AM, doug livesey wrote: > >> Hi -- I just started using cells yesterday, and I *love* it! >> I'm imagining all sorts of uses for it -- in fact my imagination might be >> going a little overboard at the moment, maybe I should lie down with a cold >> compress. >> Anyway, I was wondering if the mailing list had anyone on it who is using >> cells with rspec, and how they are doing that, if it has. >> I've got a 'controller' bit of a cell specced (but not too prettily), but >> am struggling at the moment with the 'view' bit. >> Anyway, I'll keep on experimenting, and thanks very much for an amazing >> gem -- I'm well impressed! >> Oh, and I'm using Rails 3, RSpec 2, and the latest from github for Cells. >> Cheers, >> Doug. >> >> _______________________________________________ >> Cells-talk mailing list >> Cells-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/cells-talk >> >> > > > -- > Karl Varga > e: kjvarga at gmail.com > w: kjvarga.blogspot.com > c: +1.250.884.9895 > Skype: kjvarga > -- Karl Varga e: kjvarga at gmail.com w: kjvarga.blogspot.com c: +1.250.884.9895 Skype: kjvarga -------------- next part -------------- An HTML attachment was scrubbed... URL: From biot023 at gmail.com Sat Jul 10 07:10:07 2010 From: biot023 at gmail.com (doug livesey) Date: Sat, 10 Jul 2010 12:10:07 +0100 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: I'm actually doing something like you suggest -- in my RSpec config, I'm telling it to include view helpers for a custom description block type, and then setting :type => :cells_view on the description. I will write this up & post it properly, maybe when I've extracted a little more of what I'm doing out into helpers. Cheers, Doug. On 9 July 2010 19:53, Karl Varga wrote: > Personally I'd be inclined to use an rspec integration session (in > spec/integration/) and manually instantiate my Cells (or using some > spec/support/ helpers) using a mock controller. Then you can do asserts on > your cell object and inspect the return values. > > I've used a MockController to render Cells in Rails Metal and it's working > really nicely (with url helpers and controller helpers). That was for Rails > 2.3.* but I think I know how I'd do if for Rails 3. > > Cheers, > Karl > > > > On Fri, Jul 9, 2010 at 11:46 AM, Karl Varga wrote: > >> This is a long shot, but rspec has view specs, so I wonder if those >> ExampleGroups (or whatever rspec calls them) can be borrowed to test the >> result of your cells states. >> >> Cells of course returns HTML fragments...or JSON, or YAML or whatever you >> want so it depends on how crazy you want to get :) >> >> On Thu, Jul 8, 2010 at 2:36 AM, doug livesey wrote: >> >>> Hi -- I just started using cells yesterday, and I *love* it! >>> I'm imagining all sorts of uses for it -- in fact my imagination might be >>> going a little overboard at the moment, maybe I should lie down with a cold >>> compress. >>> Anyway, I was wondering if the mailing list had anyone on it who is using >>> cells with rspec, and how they are doing that, if it has. >>> I've got a 'controller' bit of a cell specced (but not too prettily), but >>> am struggling at the moment with the 'view' bit. >>> Anyway, I'll keep on experimenting, and thanks very much for an amazing >>> gem -- I'm well impressed! >>> Oh, and I'm using Rails 3, RSpec 2, and the latest from github for Cells. >>> Cheers, >>> Doug. >>> >>> _______________________________________________ >>> Cells-talk mailing list >>> Cells-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/cells-talk >>> >>> >> >> >> -- >> Karl Varga >> e: kjvarga at gmail.com >> w: kjvarga.blogspot.com >> c: +1.250.884.9895 >> Skype: kjvarga >> > > > > -- > Karl Varga > e: kjvarga at gmail.com > w: kjvarga.blogspot.com > c: +1.250.884.9895 > Skype: kjvarga > -------------- next part -------------- An HTML attachment was scrubbed... URL: From apotonick at gmail.com Sun Jul 11 13:37:57 2010 From: apotonick at gmail.com (Nick Sutterer) Date: Sun, 11 Jul 2010 19:37:57 +0200 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: could anybody post some example how specing a cell would look like? > > On Sat, Jul 10, 2010 at 1:10 PM, doug livesey wrote: >> I'm actually doing something like you suggest -- in my RSpec config, I'm >> telling it to include view helpers for a custom description block type, and >> then setting :type => :cells_view on the description. >> I will write this up & post it properly, maybe when I've extracted a little >> more of what I'm doing out into helpers. >> Cheers, >> ?? Doug. >> On 9 July 2010 19:53, Karl Varga wrote: >>> >>> Personally I'd be inclined to use an rspec integration session (in >>> spec/integration/) and manually instantiate my Cells (or using some >>> spec/support/ helpers) using a mock controller. ?Then you can do asserts on >>> your cell object and inspect the return values. >>> I've used?a MockController to render Cells in Rails Metal and it's working >>> really nicely (with url helpers and controller helpers). ?That was for Rails >>> 2.3.* but I think I know how I'd do if for Rails 3. >>> Cheers, >>> Karl >>> >>> >>> On Fri, Jul 9, 2010 at 11:46 AM, Karl Varga wrote: >>>> >>>> This is a long shot, but rspec has view specs, so I wonder if those >>>> ExampleGroups (or whatever rspec calls them) can be borrowed to test the >>>> result of your cells states. >>>> Cells of course returns HTML fragments...or JSON, or YAML or whatever you >>>> want so it depends on how crazy you want to get :) >>>> On Thu, Jul 8, 2010 at 2:36 AM, doug livesey wrote: >>>>> >>>>> Hi -- I just started using cells yesterday, and I *love* it! >>>>> I'm imagining all sorts of uses for it -- in fact my imagination might >>>>> be going a little overboard at the moment, maybe I should lie down with a >>>>> cold compress. >>>>> Anyway, I was wondering if the mailing list had anyone on it who is >>>>> using cells with rspec, and how they are doing that, if it has. >>>>> I've got a 'controller' bit of a cell specced (but not too prettily), >>>>> but am struggling at the moment with the 'view' bit. >>>>> Anyway, I'll keep on experimenting, and thanks very much for an amazing >>>>> gem -- I'm well impressed! >>>>> Oh, and I'm using Rails 3, RSpec 2, and the latest from github for >>>>> Cells. >>>>> Cheers, >>>>> ?? Doug. >>>>> _______________________________________________ >>>>> Cells-talk mailing list >>>>> Cells-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/cells-talk >>>>> >>>> >>>> >>>> >>>> -- >>>> Karl Varga >>>> e: kjvarga at gmail.com >>>> w: kjvarga.blogspot.com >>>> c: +1.250.884.9895 >>>> Skype: kjvarga >>> >>> >>> >>> -- >>> Karl Varga >>> e: kjvarga at gmail.com >>> w: kjvarga.blogspot.com >>> c: +1.250.884.9895 >>> Skype: kjvarga >> >> >> _______________________________________________ >> Cells-talk mailing list >> Cells-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/cells-talk >> >> > From apotonick at gmail.com Mon Jul 12 04:31:04 2010 From: apotonick at gmail.com (Nick Sutterer) Date: Mon, 12 Jul 2010 10:31:04 +0200 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: doug- thanks for that examples, that was exactly what i needed to understand rspec+cells ;-) >> That's where I'm up to for the minute, anyway. There was a comment about >> using integration tests (for me, that would be Cucumber) to drive the >> testing of Cells earlier in the thread, and I must admit that that would >> often be my first choice, as unit testing views (I think) can sometimes be >> more work than is strictly necessary. However, for the highly >> component-oriented approach I'm taking in this particular project, and for >> the purposes of learning to work with Cells, I feel that speccing everything >> out completely is appropriate, here. >> well there is that method #render_cell around in tests, so you could write a cucumber step using it. all you have to do is to include Cells::AssertionsHelper in your test. look here: http://github.com/apotonick/cells_examples/blob/master/test/functional/post_cell_test.rb cheers, nick > From biot023 at gmail.com Mon Jul 12 04:52:29 2010 From: biot023 at gmail.com (doug livesey) Date: Mon, 12 Jul 2010 09:52:29 +0100 Subject: [Cells-talk] Fwd: How are people speccing their cells code? In-Reply-To: References: Message-ID: Forwarded -- I didn't realise I had only posted this to Nick (sorry about the double-post, Nick! :)). ---------- Forwarded message ---------- From: doug livesey Date: 11 July 2010 22:09 Subject: Re: [Cells-talk] How are people speccing their cells code? To: Nick Sutterer > could anybody post some example how specing a cell would look like? Well, this almost certainly isn't the best way to go about things (as I've only just started using Cells, and I'm only familiar with RSpec, not a guru), but here's what I've been doing. (Please bear in mind that all of this is subject to alter as I work out better ways of doing it.) First, I've created a couple of RSpec helper modules like so: One for the 'controller' part: http://gist.github.com/471817 And one for the 'view' part: http://gist.github.com/471818 Then I've included these in my specs by configuring RSpec to include them for a couple of custom description types. In the same config block, I also include in some of RSpec's Rails helpers for my custom types. These are in a file (called my_spec_helpers.rb) under the spec/support directory, where I put all my helpers, as RSpec Rails now includes everything under there by default. Here is the helper file, the important lines for this issue are the last four in the configure block: http://gist.github.com/471820 You can see that I define the custom description types in those last four lines. Then, I'm use these custom helpers, mixed with RSpec Rails helpers, like so: A 'controller' cell spec: http://gist.github.com/471821 The first describe block is probably the most relevant one. The second is how I'm currently speccing helpers until I create a nice way to make the helper methods available to my Cell 'view' specs, but it's not something that I'm going to be settling for for very long. A 'view' cell spec: http://gist.github.com/471824 The RSpec Rails view helpers are useful here, but I'm not currently making the most of them, as I'm speccing the helper methods in the controller bits. Like I say, that's not a situation that I intend to let lie for long. An edited version of the spec directory tree is: spec/ |-- cells | |-- basket_icon | | `-- show.html.haml_spec.rb | |-- basket_icon_cell_spec.rb | |-- product_groups | | `-- show.html.haml_spec.rb | |-- product_groups_cell_spec.rb | |-- tabs | | `-- show.html.haml_spec.rb | `-- tabs_cell_spec.rb |-- spec_helper.rb |-- support | |-- factories.rb | |-- helpers | | |-- cell_controllers | | | `-- cell_controller_helpers.rb | | |-- cell_views | | | `-- cell_view_helpers.rb | | |-- controllers | | | |-- authorisation_helpers.rb | | | `-- controller_helpers.rb | | |-- general | | | `-- general_helpers.rb | | |-- models | | | |-- attribute_helpers.rb | | | |-- validation_helpers.rb | | | `-- validation_helpers_formats.rb | | `-- views | | `-- view_helpers.rb | |-- my_spec_helper.rb | `-- s3_helpers.rb That's where I'm up to for the minute, anyway. There was a comment about using integration tests (for me, that would be Cucumber) to drive the testing of Cells earlier in the thread, and I must admit that that would often be my first choice, as unit testing views (I think) can sometimes be more work than is strictly necessary. However, for the highly component-oriented approach I'm taking in this particular project, and for the purposes of learning to work with Cells, I feel that speccing everything out completely is appropriate, here. And, as I said above, I'm nobody's idea of a guru, and this is only the very early stages of an evolving strategy. Still, though -- hope that's some help. :) Doug. On 11 July 2010 18:37, Nick Sutterer wrote: > could anybody post some example how specing a cell would look like? > > > > On Sat, Jul 10, 2010 at 1:10 PM, doug livesey wrote: > >> I'm actually doing something like you suggest -- in my RSpec config, I'm > >> telling it to include view helpers for a custom description block type, > and > >> then setting :type => :cells_view on the description. > >> I will write this up & post it properly, maybe when I've extracted a > little > >> more of what I'm doing out into helpers. > >> Cheers, > >> Doug. > >> On 9 July 2010 19:53, Karl Varga wrote: > >>> > >>> Personally I'd be inclined to use an rspec integration session (in > >>> spec/integration/) and manually instantiate my Cells (or using some > >>> spec/support/ helpers) using a mock controller. Then you can do > asserts on > >>> your cell object and inspect the return values. > >>> I've used a MockController to render Cells in Rails Metal and it's > working > >>> really nicely (with url helpers and controller helpers). That was for > Rails > >>> 2.3.* but I think I know how I'd do if for Rails 3. > >>> Cheers, > >>> Karl > >>> > >>> > >>> On Fri, Jul 9, 2010 at 11:46 AM, Karl Varga wrote: > >>>> > >>>> This is a long shot, but rspec has view specs, so I wonder if those > >>>> ExampleGroups (or whatever rspec calls them) can be borrowed to test > the > >>>> result of your cells states. > >>>> Cells of course returns HTML fragments...or JSON, or YAML or whatever > you > >>>> want so it depends on how crazy you want to get :) > >>>> On Thu, Jul 8, 2010 at 2:36 AM, doug livesey > wrote: > >>>>> > >>>>> Hi -- I just started using cells yesterday, and I *love* it! > >>>>> I'm imagining all sorts of uses for it -- in fact my imagination > might > >>>>> be going a little overboard at the moment, maybe I should lie down > with a > >>>>> cold compress. > >>>>> Anyway, I was wondering if the mailing list had anyone on it who is > >>>>> using cells with rspec, and how they are doing that, if it has. > >>>>> I've got a 'controller' bit of a cell specced (but not too prettily), > >>>>> but am struggling at the moment with the 'view' bit. > >>>>> Anyway, I'll keep on experimenting, and thanks very much for an > amazing > >>>>> gem -- I'm well impressed! > >>>>> Oh, and I'm using Rails 3, RSpec 2, and the latest from github for > >>>>> Cells. > >>>>> Cheers, > >>>>> Doug. > >>>>> _______________________________________________ > >>>>> Cells-talk mailing list > >>>>> Cells-talk at rubyforge.org > >>>>> http://rubyforge.org/mailman/listinfo/cells-talk > >>>>> > >>>> > >>>> > >>>> > >>>> -- > >>>> Karl Varga > >>>> e: kjvarga at gmail.com > >>>> w: kjvarga.blogspot.com > >>>> c: +1.250.884.9895 > >>>> Skype: kjvarga > >>> > >>> > >>> > >>> -- > >>> Karl Varga > >>> e: kjvarga at gmail.com > >>> w: kjvarga.blogspot.com > >>> c: +1.250.884.9895 > >>> Skype: kjvarga > >> > >> > >> _______________________________________________ > >> Cells-talk mailing list > >> Cells-talk at rubyforge.org > >> http://rubyforge.org/mailman/listinfo/cells-talk > >> > >> > > > _______________________________________________ > Cells-talk mailing list > Cells-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/cells-talk > -------------- next part -------------- An HTML attachment was scrubbed... URL: From biot023 at gmail.com Sat Jul 17 10:07:35 2010 From: biot023 at gmail.com (doug livesey) Date: Sat, 17 Jul 2010 15:07:35 +0100 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: > well there is that method #render_cell around in tests, so you could write a cucumber step using it. all you have to do is to include Cells::AssertionsHelper in your test. Only just had a chance to try this, with all the old/new job madness, but it works a treat. Just a note for people who want to use this with other assertion methods that assert_selekt/assert_select, I have a do_render method that re-renders the results of render_cell as text so that the usual view helper methods can be used with it. It looks like this, and is working so far: def do_render html = render_cell( :product_groups, :show ) render( text: html ) end Cheers, Doug. -------------- next part -------------- An HTML attachment was scrubbed... URL: From biot023 at gmail.com Sat Jul 17 10:09:25 2010 From: biot023 at gmail.com (doug livesey) Date: Sat, 17 Jul 2010 15:09:25 +0100 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: Refactored that a little so that now my cells view helper in RSpec looks like this: http://gist.github.com/479526 Now render_cell sets up the rendered & other view helper methods for greater convenience. Cheers, Doug. On 17 July 2010 15:07, doug livesey wrote: > > well there is that method #render_cell around in tests, so you > could write a cucumber step using it. all you have to do is to > include Cells::AssertionsHelper in your test. > > Only just had a chance to try this, with all the old/new job madness, but > it works a treat. > Just a note for people who want to use this with other assertion methods > that assert_selekt/assert_select, I have a do_render method that re-renders > the results of render_cell as text so that the usual view helper methods can > be used with it. It looks like this, and is working so far: > > def do_render > html = render_cell( :product_groups, :show ) > render( text: html ) > end > > Cheers, > Doug. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From biot023 at gmail.com Sat Jul 17 10:21:12 2010 From: biot023 at gmail.com (doug livesey) Date: Sat, 17 Jul 2010 15:21:12 +0100 Subject: [Cells-talk] How are people speccing their cells code? In-Reply-To: References: Message-ID: Damn', but that means that #assign() isn't working! Back to the drawing board ... On 17 July 2010 15:09, doug livesey wrote: > Refactored that a little so that now my cells view helper in RSpec looks > like this: http://gist.github.com/479526 > Now render_cell sets up the rendered & other view helper methods for > greater convenience. > Cheers, > Doug. > > > On 17 July 2010 15:07, doug livesey wrote: > >> > well there is that method #render_cell around in tests, so you >> could write a cucumber step using it. all you have to do is to >> include Cells::AssertionsHelper in your test. >> >> Only just had a chance to try this, with all the old/new job madness, but >> it works a treat. >> Just a note for people who want to use this with other assertion methods >> that assert_selekt/assert_select, I have a do_render method that re-renders >> the results of render_cell as text so that the usual view helper methods can >> be used with it. It looks like this, and is working so far: >> >> def do_render >> html = render_cell( :product_groups, :show ) >> render( text: html ) >> end >> >> Cheers, >> Doug. >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: