Re: [rspec-users] Cucumber - step negating another expecting step

2009-04-23 Thread Jeff Talbot
> > Then /^I (should|should not) see the people search form$/ do > |should_or_should_not| > expect_that(response, should_or_should_not, have_tag('form#frmSearch')) > end > > def expect_that(target, should_or_should_not, matcher) > target.send should_or_should_not.underscore.to_sym, matcher > end

Re: [rspec-users] Cucumber - step negating another expecting step

2009-04-22 Thread Jeff Talbot
On Wed, Apr 22, 2009 at 1:17 AM, aslak hellesoy wrote: > > > 2009/4/17 Lenny Marks > >> I've been doing something similar. I think the benefit of having half the >> steps(each can be negated) wins over the small impact it has on step >> readability. Personally I started adding stuff like this(per

Re: [rspec-users] Problem seeing and accessing RSpec gems

2009-04-13 Thread Jeff Talbot
I'm sure you have tried this, but it's such a simple step that I'll throw it out. I've had a couple instances in the past where gems were not being loaded and after troubleshooting for a while, I found that all problems were magically solved by firing up a new instance of my shell (new terminal wi

Re: [rspec-users] Surprised by stub/mock interaction

2009-02-25 Thread Jeff Talbot
On Wed, Feb 25, 2009 at 10:23 AM, David Chelimsky wrote: > On Wed, Feb 25, 2009 at 10:10 AM, Jeff Talbot > wrote: > > Hello, > > > > Something I do often is use stub methods in before blocks and mock > > expectations in a specific examples (much

[rspec-users] Surprised by stub/mock interaction

2009-02-25 Thread Jeff Talbot
Hello, Something I do often is use stub methods in before blocks and mock expectations in a specific examples (much like described here: http://blog.davidchelimsky.net/2006/11/9/tutorial-rspec-stubs-and-mocks). I was just surprised with an instance of doing this and I thought I'd check with the g

[rspec-users] RecordNotFound bubbling thru to cucumber

2009-02-06 Thread Jeff Talbot
Hello, I have a controller action that raises a RecordNotFound exception if you're not allowed to see something. In my global application controller (application.rb), I catch these and render the 404 template. But when I run cucumber (using webrat), it's getting the full stacktrace (the step blows

Re: [rspec-users] Database.truncate_all

2008-12-07 Thread Jeff Talbot
Cool. Thanks, guys. On Sat, Dec 6, 2008 at 11:28 AM, Ben Mabey <[EMAIL PROTECTED]> wrote: > Jeff Talbot wrote: >> >> There is a seemingly very useful line of code in the cucumber wiki >> that I'd like to use: >> >> After do >># Sce

[rspec-users] Database.truncate_all

2008-12-05 Thread Jeff Talbot
There is a seemingly very useful line of code in the cucumber wiki that I'd like to use: After do # Scenario teardown Database.truncate_all end (from http://github.com/aslakhellesoy/cucumber/wikis/migration-from-rspec-stories) But when I run this I get an uninitialized constant erro