Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-13 Thread s.ross
Hi-- On May 13, 2009, at 12:47 AM, Lee wrote: I found a potential solution from this blog: http://www.rubytutorials.net/2008/02/29/small-rspec-revelations-rjs/ In my spec for the view in which I want to include the AJAX functionality ("new.html.erb_spec.erb"), I have added a couple of Examples

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-13 Thread Lee
I found a potential solution from this blog: http://www.rubytutorials.net/2008/02/29/small-rspec-revelations-rjs/ In my spec for the view in which I want to include the AJAX functionality ("new.html.erb_spec.erb"), I have added a couple of Examples to drive out the some of the AJAX functionality:

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Phlip
David Chelimsky wrote: You could just say "be careful not to mock too much," which would be really good advice, Sorry; I thought I said that. This industry in general dislikes strong opinions... Mock on, everyone! > but instead you make a generalizing and judgmental statement like this. Wh

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Matt Wynne
On 12 May 2009, at 16:33, Lee wrote: Thanks Matt. I have been trying out Cucumber and Culerity (Celerity) but rather than jump directly from Cucumber to coding the necessary views, controllers and models required for each scenario, I wanted to drive out the code using RSpec. So I've started to

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee
Thanks Matt. I have been trying out Cucumber and Culerity (Celerity) but rather than jump directly from Cucumber to coding the necessary views, controllers and models required for each scenario, I wanted to drive out the code using RSpec. So I've started to spec a view required by a scenario, and

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee
Thanks Mike. fyi, I am trying out Cucumber and Culerity for integration testing. Culerity provides for AJAX testing. Having written my first Cucumber (with Culerity) feature and set of scenarios, I was keen to then use RSpec to begin driving out the views, controllers etc so that I can eventually

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Matt Wynne
On 12 May 2009, at 15:07, David Chelimsky wrote: Lee, Phlip has some really great ideas about some things, and assert2 is lovely, but based on several posts on this and other lists, I'd say he doesn't really like RSpec, nor understand its underlying intent. So by all means listen to his advice,

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee
Thanks Philip. I should have added in my original post that I have included the Webrat::Matchers as instructed in The Rspec Book. Unless I have misunderstood you, it appears that RSpec with Webrat::Matchers do not support the driving out of AJAX functionality in views, hence the need to use Nokog

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Mike Doel
On May 12, 2009, at 8:36 AM, Lee Longmore wrote: I am new to RSpec and have just started to drive out my first Rails view using a spec. I have used the The RSpec Book (beta) to do the basic stuff like testing for the presence of a field but I am unsure where to start for driving out some A

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread David Chelimsky
On Tue, May 12, 2009 at 8:33 AM, Phlip wrote: > Lee Longmore wrote: >> >> I am new to RSpec and have just started to drive out my first Rails view >> using a spec. I have used the The RSpec Book (beta) to do the basic stuff >> like testing for the presence of a field but I am unsure where to start

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Phlip
Lee Longmore wrote: I am new to RSpec and have just started to drive out my first Rails view using a spec. I have used the The RSpec Book (beta) to do the basic stuff like testing for the presence of a field but I am unsure where to start for driving out some AJAX functionality. To test the

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Phlip
Lee Longmore wrote: I am new to RSpec and have just started to drive out my first Rails view using a spec. I have used the The RSpec Book (beta) to do the basic stuff like testing for the presence of a field but I am unsure where to start for driving out some AJAX functionality. In the view,

[rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee Longmore
I am new to RSpec and have just started to drive out my first Rails view using a spec. I have used the The RSpec Book (beta) to do the basic stuff like testing for the presence of a field but I am unsure where to start for driving out some AJAX functionality. In the view, I will have a text fie