Re: [rspec-users] Specs versus Stories

2008-02-22 Thread Brian Takita
There are automated & manual tests. Automated customer facing & Automated developer tests. Both customer facing and developer tests can have a unit, functional, and integration scope. That being said, you can have effective high level developer Specs. Stories are great for facilitation communicat

Re: [rspec-users] Webrat integration with Rspec and Rake tasks

2008-02-22 Thread Ed Howland
On Wed, Feb 20, 2008 at 1:02 AM, Jarkko Laine <[EMAIL PROTECTED]> wrote: > > On 19.2.2008, at 20.45, James Deville wrote: > > > I set RAILS_ENV in my stories/helper.rb file. That might be a good > > solution. > > > > > > Using Webrat for 100% of my stories (and running autotest) and loving >

Re: [rspec-users] Webrat integration with Rspec and Rake tasks

2008-02-22 Thread Joe Van Dyk
On Tue, Feb 19, 2008 at 11:02 PM, Jarkko Laine <[EMAIL PROTECTED]> wrote: > > On 19.2.2008, at 20.45, James Deville wrote: > > > I set RAILS_ENV in my stories/helper.rb file. That might be a good > > solution. > > > > > > On Feb 19, 2008, at 10:32 AM, Ed Howland wrote: > > > >> Hi, > >> >

Re: [rspec-users] Old Style Stories

2008-02-22 Thread Kero
> > > so is writing in Ruby". This begs the question now that we have plain > > > text stories. Can we make the ruby-based stories more developer > > > friendly? Perhaps remove string identifiers, use symbols. Quit passing > > > in blocks to story parts, assume each story part is a method c

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 9:20 AM, Maurício Linhares <[EMAIL PROTECTED]> wrote: > Hi David, > > First, using the controller doesn't work also :) > > After some debugging here i found out why it was trowing the error, > the RedirectTo matcher uses the > ActionController::Routing::Routes.recognize_

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread Maurício Linhares
Hi David, First, using the controller doesn't work also :) After some debugging here i found out why it was trowing the error, the RedirectTo matcher uses the ActionController::Routing::Routes.recognize_path method to discover if a path exists and this method takes two parameters, the path and th

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 8:10 AM, Maurício Linhares <[EMAIL PROTECTED]> wrote: > Using the "path" method the spec passes, but i don't use the path > method on my controller. First, here's my controller code: > > def create > @static_page = @event.static_pages.build(params[:static_page]) > >

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread Maurício Linhares
Using the "path" method the spec passes, but i don't use the path method on my controller. First, here's my controller code: def create @static_page = @event.static_pages.build(params[:static_page]) respond_to do |format| if @static_page.save flash[:notice] = 'Page was suc

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:58 AM, Max Williams <[EMAIL PROTECTED]> wrote: > doh...dammit, i thought i'd tried that. I'm losing it... > > thanks! You're welcome. Cheers, David > > > > On 22/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Fri, Feb 22, 2008 at 7:26 AM, Max Williams > > <

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:50 AM, Maurício Linhares <[EMAIL PROTECTED]> wrote: > Hello guys, > > I have the following spec: > > describe 'With successful save' do > > it 'Should redirect to the new page' do > do_post > response.should be_redirect > response.should

Re: [rspec-users] Old Style Stories

2008-02-22 Thread Zach Dennis
On Thu, Feb 21, 2008 at 11:40 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Thu, Feb 21, 2008 at 10:26 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > > On Thu, Feb 21, 2008 at 9:07 PM, Zach Dennis > > As you mentioned David, > "Plain text is great for some situations, but > > > >

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread Max Williams
doh...dammit, i thought i'd tried that. I'm losing it... thanks! On 22/02/2008, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Fri, Feb 22, 2008 at 7:26 AM, Max Williams > <[EMAIL PROTECTED]> wrote: > > I'm already successfully testing before_filters in > application_controller > > courtesy o

[rspec-users] Problems with redirect_to

2008-02-22 Thread Maurício Linhares
Hello guys, I have the following spec: describe 'With successful save' do it 'Should redirect to the new page' do do_post response.should be_redirect response.should redirect_to( :action => 'show', :id => @static_page.permalink ) ## this is the line 118 en

Re: [rspec-users] Old Style Stories

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:46 AM, Zach Dennis <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 21, 2008 at 11:40 PM, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Thu, Feb 21, 2008 at 10:26 PM, David Chelimsky <[EMAIL PROTECTED]> > wrote: > > > > > > On Thu, Feb 21, 2008 at 9:07 PM, Zach Dennis

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:26 AM, Max Williams <[EMAIL PROTECTED]> wrote: > I'm already successfully testing before_filters in application_controller > courtesy of this blog post: > http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller > > However, i can;'t work out ho

[rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread Max Williams
I'm already successfully testing before_filters in application_controller courtesy of this blog post: http://www.movesonrails.com/articles/2008/01/23/spec-ing-your-application-controller However, i can;'t work out how to test the sort of method that is added to application_controller so that all c