Re: [rspec-users] Quickcheck testing framework

2010-05-16 Thread Scott Taylor
On May 16, 2010, at 8:13 PM, David Chelimsky wrote: > On May 16, 2010, at 12:54 PM, Scott Taylor wrote: > >> Hey all, >> >> I'm wondering if anyone has any experience with an automated test-case >> generation tool like Quickcheck (for erlang/haskell). I'd be interested in >> hearing any impre

Re: [rspec-users] Best practices for managing fixtures outside Rails?...

2010-05-16 Thread Scott Taylor
On May 14, 2010, at 8:25 PM, Stu wrote: > Hi, > > I have a non-Rails Ruby project that uses RSpec. It needs a shared > collection of fixture-like objects created, although they have nothing > to do with Rails, AR or database entries: > > w1 = Widget.new(10) > w2 = Widget.new(20) > w3 = Widget.

Re: [rspec-users] Stubbing return arguments

2010-05-16 Thread rhydiant
Thanks for the reply David, works a treat. I'll probably end up refacting away from that design but right now that's exactly what I need. Regards Rhydian On May 17, 9:10 am, David Chelimsky wrote: > On May 15, 2010, at 2:56 AM, rhydiant wrote: > > > > > I'm writting a code example for the follo

Re: [rspec-users] Quickcheck testing framework

2010-05-16 Thread David Chelimsky
On May 16, 2010, at 12:54 PM, Scott Taylor wrote: > Hey all, > > I'm wondering if anyone has any experience with an automated test-case > generation tool like Quickcheck (for erlang/haskell). I'd be interested in > hearing any impressions, war stories, or dev workflows regarding a tool like >

Re: [rspec-users] Best practices for managing fixtures outside Rails?...

2010-05-16 Thread David Chelimsky
On May 14, 2010, at 7:25 PM, Stu wrote: > Hi, > > I have a non-Rails Ruby project that uses RSpec. It needs a shared > collection of fixture-like objects created, although they have nothing > to do with Rails, AR or database entries: > > w1 = Widget.new(10) > w2 = Widget.new(20) > w3 = Widget.ne

Re: [rspec-users] Stubbing return arguments

2010-05-16 Thread David Chelimsky
On May 15, 2010, at 2:56 AM, rhydiant wrote: > I'm writting a code example for the following method: > >def upload(email_address, product_data) > errors = [] > user = resolve_user_from(email_address) > product_file_name = ProductFileHandler.persist(user, > product_data, errors)

Re: [rspec-users] spec/support directory outside Rails?...

2010-05-16 Thread David Chelimsky
On May 14, 2010, at 7:03 PM, Stu wrote: > Hi, > > I have a group of non-Rails Ruby projects that all make heavy use of > RSpec. Each of these projects has a "spec" directory with a > "helper.rb" file. All the *_spec.rb files in the spec directory tree > do the usual > > require File.dirname(__

[rspec-users] A full rails application with rspec test code

2010-05-16 Thread Nadal
I used bostonrb code base http://github.com/bostonrb/bostonrb to learn about shoulda. Similarly is there a decent rails based application with test code in rspec to see how to write good rspec test code at both unit and functional level. I am trying to get started with rspec. Thanks _

[rspec-users] spec/support directory outside Rails?...

2010-05-16 Thread Stu
Hi, I have a group of non-Rails Ruby projects that all make heavy use of RSpec. Each of these projects has a "spec" directory with a "helper.rb" file. All the *_spec.rb files in the spec directory tree do the usual require File.dirname(__FILE__) + "/../helper" like dance. I understand that RS

[rspec-users] Best practices for managing fixtures outside Rails?...

2010-05-16 Thread Stu
Hi, I have a non-Rails Ruby project that uses RSpec. It needs a shared collection of fixture-like objects created, although they have nothing to do with Rails, AR or database entries: w1 = Widget.new(10) w2 = Widget.new(20) w3 = Widget.new(30) # ... g1 = Gadget.new(w1, w2) g2 = Gadget.new(w3, w

[rspec-users] Stubbing return arguments

2010-05-16 Thread rhydiant
I'm writting a code example for the following method: def upload(email_address, product_data) errors = [] user = resolve_user_from(email_address) product_file_name = ProductFileHandler.persist(user, product_data, errors) if errors.blank? # ... do some stuff

[rspec-users] Quickcheck testing framework

2010-05-16 Thread Scott Taylor
Hey all, I'm wondering if anyone has any experience with an automated test-case generation tool like Quickcheck (for erlang/haskell). I'd be interested in hearing any impressions, war stories, or dev workflows regarding a tool like this. Talking off list to David C, he suggested that it might

Re: [rspec-users] Failing Flash Spec

2010-05-16 Thread David Chelimsky
On May 15, 2010, at 7:18 PM, Kwang how Tan wrote: > I am having failing simple spec which I couldn't figure out why :-( > http://gist.github.com/402517 > > * ffaker (0.4.0) > * machinist (1.0.6) > * rails (3.0.0.beta3) > * rspec (2.0.0.beta.8) > * rspec-core (2.0.0.beta.8) > * rspec-expecta