Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread David Chelimsky
On Sat, Feb 7, 2009 at 8:05 PM, Nick Hoffman wrote: > On 07/02/2009, at 1:16 PM, David Chelimsky wrote: >> >> On Sat, Feb 7, 2009 at 9:59 AM, Nick Hoffman wrote: >>> >>> When writing Cucumber stories and features for controllers, should you >>> cover >>> every edge case? For example, should you w

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread Jim Morris
Yet another way to do fixtures/factories is a hybrid that I outline in my blog, its basically what I do. http://blog.wolfman.com/posts/42 Basically I can't use the existing libraries as I am not using ActiveRecord. On Feb 5, 8:17 am, Ben Mabey wrote: > David Chelimsky wrote: > > I highly recom

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread Nick Hoffman
On 07/02/2009, at 1:16 PM, David Chelimsky wrote: On Sat, Feb 7, 2009 at 9:59 AM, Nick Hoffman wrote: When writing Cucumber stories and features for controllers, should you cover every edge case? For example, should you write stories that feed bad or missing data to your controllers, or sh

Re: [rspec-users] Fixjour and others

2009-02-07 Thread Jim Morris
Well sometimes one can't use an existing library becuase of some reason or other, like in my case not using ActiveRecord. So I came up with yet another way to do it, I think it is a hyvrid between Fixtures and Factories. outlined here... http://blog.wolfman.com/posts/42 On Feb 7, 8:16 am, Jay

Re: [rspec-users] [Cucumber] Progress Bar

2009-02-07 Thread Luke Melia
FYI, brynary has a progress formatter in testjour that could probably be ported. On Feb 6, 2009, at 2:43 PM, nicholas a. evans wrote: Yay! Thanks for this. I kept saying "I'll get around to this... tomorrow!" And well... :-) -- Nick On Thu, Feb 5, 2009 at 6:43 PM, Matt Wynne wrote: Insp

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread David Chelimsky
On Sat, Feb 7, 2009 at 10:20 AM, Pat Maddox wrote: > On Sat, Feb 7, 2009 at 3:16 AM, doug livesey wrote:. > > def do_get > get :index, :format => "xml" > end > > should work. Notice it's a string instead of symbol. I should change the gen'd specs then. That's simpler, ay? > > Pat > __

Re: [rspec-users] testing out cucumber scenario outline feature

2009-02-07 Thread Joaquin Rivera Padron
hey thanks joseph, I tried this out: $ ruby script/plugin install git://github.com/dchelimsky/rspec.git -r 'tag 1.1.12' $ ruby script/plugin install git://github.com/dchelimsky/rspec-rails.git -r 'tag 1.1.12' now Webrat finds correctly rspec-rails. Before it was a system gem and so it failed, and

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread s.ross
Hi-- On Feb 7, 2009, at 7:59 AM, Nick Hoffman wrote: On 06/02/2009, at 10:00 PM, s.ross wrote: I did stop writing new controller specs, but we were discussing the use-case for controller specs in the new Cukified world. Supposing you write scenarios that pretty much describe your app, what

Re: [rspec-users] How to write test cases in rcov

2009-02-07 Thread David Chelimsky
On Sat, Feb 7, 2009 at 12:06 AM, Brijesh Shah wrote: > Hi I am using rcov to generate code coverage. But I don't know how to > write cases for that... > > I have installed rcov gem and and execute rcov test/*.rb command. It > shows me some code coverage in files. > > Can anyone help me by giving

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread David Chelimsky
On Sat, Feb 7, 2009 at 9:59 AM, Nick Hoffman wrote: > On 06/02/2009, at 10:00 PM, s.ross wrote: >> >> I did stop writing new controller specs, but we were discussing the >> use-case for controller specs in the new Cukified world. Supposing you write >> scenarios that pretty much describe your app,

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread Joaquin Rivera Padron
2009/2/7 Nick Hoffman > When writing Cucumber stories and features for controllers, should you > cover every edge case? For example, should you write stories that feed bad > or missing data to your controllers, or should that be left to RSpec? > -Nick the missing data case should be left for a

Re: [rspec-users] [RSpec] Setting a gem dep on rspec-rails

2009-02-07 Thread David Chelimsky
On Sat, Feb 7, 2009 at 12:27 PM, Pat Maddox wrote: > On Sat, Feb 7, 2009 at 9:30 AM, Nick Hoffman wrote: >> With that said, I'm wondering what the accepted way to setup gem >> dependencies on rspec and rspec-rails is. Should one not bother? Should the >> "config.gem" lines go in config/environmen

Re: [rspec-users] [RSpec] Setting a gem dep on rspec-rails

2009-02-07 Thread Pat Maddox
On Sat, Feb 7, 2009 at 9:30 AM, Nick Hoffman wrote: > With that said, I'm wondering what the accepted way to setup gem > dependencies on rspec and rspec-rails is. Should one not bother? Should the > "config.gem" lines go in config/environments/test.rb ? I don't bother to use config.gem with rspec

Re: [rspec-users] [RSpec] Setting a gem dep on rspec-rails

2009-02-07 Thread Zach Dennis
On Sat, Feb 7, 2009 at 12:30 PM, Nick Hoffman wrote: > For a while now, I've had the following in config/environment.rb : > > config.gem 'haml' > config.gem 'rspec', :lib => 'spec' > config.gem 'rspec-rails', :lib => 'spec/rails' > > I just tried running the Rails console in production mode, and t

Re: [rspec-users] [RSpec] Setting a gem dep on rspec-rails

2009-02-07 Thread Nick Hoffman
On 07/02/2009, at 12:30 PM, Nick Hoffman wrote: For a while now, I've had the following in config/environment.rb : config.gem 'haml' config.gem 'rspec', :lib => 'spec' config.gem 'rspec-rails', :lib => 'spec/rails' I just tried running the Rails console in production mode, and this warning oc

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread doug livesey
Well, I can guarantee that it's better than any home-grown solution I would attempt, so I'll be happy w/ that for now! ;)Cheers again, Doug. 2009/2/7 David Chelimsky > On Feb 7, 2009, at 10:00 AM, doug livesey wrote: > > Cheers for that -- that's what I thought was the hacky solution! ;)I'm

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread Pat Maddox
On Sat, Feb 7, 2009 at 3:16 AM, doug livesey wrote:. def do_get get :index, :format => "xml" end should work. Notice it's a string instead of symbol. Pat ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/r

Re: [rspec-users] testing out cucumber scenario outline feature

2009-02-07 Thread Joseph Wilk
Joaquin Rivera Padron wrote: hey there, I've been playing with Scenario Outline according to cucumber wiki. I have paste the tests made in http://gist.github.com/59920 the short answers: http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines seems inaccurate, Examples should be More

Re: [rspec-users] [RSpec] rcov and/or rexml bug?

2009-02-07 Thread Fernando Perez
> Something got screwed when uninstalling the old rcov gem, I now get the > following error message: > Finally got things back to 'almost' normal, I had to edit my $PATH var to make rcov 0.8.1.2 work and bug on: /usr/local/ruby1.8.7//lib/ruby/1.8/rexml/formatters/pretty.rb:131:in `[]': no imp

[rspec-users] [RSpec] Setting a gem dep on rspec-rails

2009-02-07 Thread Nick Hoffman
For a while now, I've had the following in config/environment.rb : config.gem 'haml' config.gem 'rspec', :lib => 'spec' config.gem 'rspec-rails', :lib => 'spec/rails' I just tried running the Rails console in production mode, and this warning occured: irb: warn: can't alias context from irb_

Re: [rspec-users] Fixjour and others

2009-02-07 Thread Jay Levitt
Scott Taylor wrote: > [ "So my main objective with fixjour is to have the simplest implementation possible, with a very simple API. So it will create the following methods: new_[model], create_[model], and valid_[model]_attributes." This seems to be an anti-pattern in the Rails community: "I

Re: [rspec-users] [RSpec] rcov and/or rexml bug?

2009-02-07 Thread Fernando Perez
> So I uninstalled rcov, and installed instead: spicycode-rcov, but now it > cannot find the binary file. Using spicycode do I need to make any tweak > to a rake file? I finally got everything working with no bugs by doing: 1) git clone git://github.com/spicycode/rcov.git 2) cd rcov 3) sudo ru

Re: [rspec-users] [RSpec] rcov and/or rexml bug?

2009-02-07 Thread Fernando Perez
David Chelimsky wrote: > On Tue, Feb 3, 2009 at 7:32 AM, James Byrne > wrote: >> >> thinking that maybe RSpec 1.1.12, Rails 2.2.2 and perhaps Rcov 0.8.1 >> have some incompatibilities. > > Try spicycode's rcov: > > [sudo] gem install spicycode-rcov --source http://gems.github.com Something got

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread Nick Hoffman
On 06/02/2009, at 10:00 PM, s.ross wrote: I did stop writing new controller specs, but we were discussing the use-case for controller specs in the new Cukified world. Supposing you write scenarios that pretty much describe your app, what could possibly go wrong that a controller spec would c

[rspec-users] testing out cucumber scenario outline feature

2009-02-07 Thread Joaquin Rivera Padron
hey there, I've been playing with Scenario Outline according to cucumber wiki. I have paste the tests made in http://gist.github.com/59920 the short answers: http://wiki.github.com/aslakhellesoy/cucumber/scenario-outlines seems inaccurate, Examples should be More Examples. Should I edit the wiki f

Re: [rspec-users] [OT] Object Mother vs Test Data Builder (was Jay Fields' blog on developer testing)

2009-02-07 Thread Fernando Perez
Joaquin Rivera Padron wrote: > hey fernando, > maybe you want to take a look at > http://www.patmaddox.com/blog/2009/1/15/how-i-test-controllers-2009-remix > and give Cucumber a try regarding controllers spec-ing > hth, > joaquin Hi, I already use Cucumber+Webrat for testing that my publicly acce

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread David Chelimsky
On Feb 7, 2009, at 10:00 AM, doug livesey wrote: Cheers for that -- that's what I thought was the hacky solution! ;) I'm now reassured that I'm not being evil -- thanks! Not so fast! It works, and it's what rspec uses, but that doesn't make it good ( as opposed to evil ). I'd add support

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread doug livesey
Cheers for that -- that's what I thought was the hacky solution! ;)I'm now reassured that I'm not being evil -- thanks! Doug. 2009/2/7 David Chelimsky > On Sat, Feb 7, 2009 at 5:16 AM, doug livesey wrote: > > Hi -- I have a hacky work-around for this, but wondered if anyone could > tell > >

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread David Chelimsky
On Sat, Feb 7, 2009 at 5:16 AM, doug livesey wrote: > Hi -- I have a hacky work-around for this, but wondered if anyone could tell > me the canonical way of sending the get/put/etc. portion of a spec with > format information. This is what is in the specs generated by rspec-rails: request.env[

[rspec-users] Speccing the format portion of a controller

2009-02-07 Thread doug livesey
Hi -- I have a hacky work-around for this, but wondered if anyone could tell me the canonical way of sending the get/put/etc. portion of a spec with format information.I guess with something that might look like this: def do_get get :index, :format => :xml end Cheers, Doug. _