Re: [rspec-users] cucumber - when to stub/mock

2009-05-05 Thread Matthew Van Horn
Actually, I do have my own object wrapping GeoIp, and I stubbed the method on that object that returns a country code for me. I can see maybe creating another object to be used in the test environment, but I can't see what advantages that offers over using the rspec mocking framework. On Ma

[rspec-users] DB transactions w/ RSpec

2009-05-05 Thread Francis Hwang
Sorry if this has been answered elsewhere, Google was not very helpful to me on this one. If I'm running a model spec and am one of those benighted souls who wants to hit the DB while doing so, is there a way for me to tell RSpec to skip transactions? In Test::Unit I can say "uses_transaction :test

Re: [rspec-users] Problem verifying routing error

2009-05-05 Thread Randy Harmon
Hi again. I haven't heard any responses on this thread (is this thing on? ;). Is there any known pattern for verifying a route that *doesn't* exist, as of Rspec 1.2.6? Thanks, Randy Randy Harmon wrote: > Hi, > > When upgrading to rspec/rspec-rails 1.2.6 gem (from 1.1.12), I'm having > a new pr

Re: [rspec-users] Problem verifying routing error

2009-05-05 Thread Randy Harmon
Hi again. I haven't heard any responses on this thread (is this thing on? ;) . Is there any known pattern for verifying a route that *doesn't* exist, as of Rspec 1.2.6? Thanks, Randy Randy Harmon wrote: > Hi, > > When upgrading to rspec/rspec-rails 1.2.6 gem (from 1.1.12), I'm having > a new

Re: [rspec-users] cucumber - when to stub/mock

2009-05-05 Thread Bill Kocik
My absolute favorite solution for this: http://github.com/chrisk/fakeweb/tree/master I use that in an application I'm building that uses Twitter's OAuth, and otherwise heavily uses the Twitter API. It allows me to easily fake out all of Twitter's responses so I can do unit/integration/acceptance t

Re: [rspec-users] cucumber - when to stub/mock

2009-05-05 Thread Pat Maddox
Don't mock the Geolp library directly. Wrap it with an API that fits your domain better. Then write a very simple object that implements the same API but doesn't hit the network. You can use a switch somewhere in env.rb to use your fake implementation or the Geolp one. Pat On Sunday, May 3, 2009,

Re: [rspec-users] Using Rails observers and testability

2009-05-05 Thread Pat Maddox
On Mon, May 4, 2009 at 12:39 PM, Zach Dennis wrote: > On Mon, May 4, 2009 at 1:57 PM, BJ Clark wrote: >> Fernando, >> >> They are easier to spec with Pat Maddox's "no peeping toms" plugin. >> http://github.com/pat-maddox/no-peeping-toms/tree/master > > I use Pat's no-peeping-toms plugin as well.

Re: [rspec-users] [cucumber] Bug introduced in 0.3.1

2009-05-05 Thread aslak hellesoy
> Hi List, > We didn't resolve this in the end, we rolled back to Cucumber 0.3.0; has > anyone else seen anything similar? > Nobody else has reported anything similar on this mailing list. Can you run with --backtrace on so we can see where the error is coming from? Can you also gist your features

Re: [rspec-users] [cucumber] Bug introduced in 0.3.1

2009-05-05 Thread Lee Hambley
Hi List, We didn't resolve this in the end, we rolled back to Cucumber 0.3.0; has anyone else seen anything similar? - Lee 2009/4/30 Julian Leviston > I have NO idea if this is relevant, but the way you extend worlds has > changed, I'm fairly sure. > Julian. > > > On 30/04/2009, at 10:15 PM, Le