Re: [rspec-users] Custom Example Groups

2009-04-19 Thread David Chelimsky
: rspec-users >> Subject: Re: [rspec-users] Custom Example Groups >> >> So you probably want to wrap asset_recognizes and assert_generates in >> custom matchers at that point: >> >> def with_method(verb) do |verb| >>   subject { {:path => description_args.firs

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread Brandon Olivares
> -Original Message- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of David Chelimsky > Sent: Sunday, April 19, 2009 10:03 AM > To: rspec-users > Subject: Re: [rspec-users] Custom Example Groups > > So y

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread Matt Wynne
On 19 Apr 2009, at 13:58, David Chelimsky wrote: Also - you really don't need custom groups for this sort of thing, because you can define with_method in a module and extend the configuration w/ that module: module WithMethod def with_method(verb) subject { send(verb, description_args

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread David Chelimsky
c-users >> Subject: Re: [rspec-users] Custom Example Groups >> >> You should be able to get what you're after like this: >> >> A class method: >> >> class MyGroup < Spec::ExampleGroup >>   class << self >>     def with_method

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread Brandon Olivares
> -Original Message- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of David Chelimsky > Sent: Sunday, April 19, 2009 8:59 AM > To: rspec-users > Subject: Re: [rspec-users] Custom Example Groups > > You should be

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread David Chelimsky
c-users >> Subject: Re: [rspec-users] Custom Example Groups >> >> On Sun, Apr 19, 2009 at 5:10 AM, Pat Maddox >> wrote: >> > Check out http://gist.github.com/97967 - top one is a custom example >> > group, and bottom one is accessing an example's insta

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread Brandon Olivares
> -Original Message- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of David Chelimsky > Sent: Sunday, April 19, 2009 8:05 AM > To: rspec-users > Subject: Re: [rspec-users] Custom Example Groups > > On Sun, Apr

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread David Chelimsky
c-users >> Subject: Re: [rspec-users] Custom Example Groups >> >> Check out http://gist.github.com/97967 - top one is a custom example >> group, and bottom one is accessing an example's instance var from >> within a matcher. >> > > Thank you very much! That

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread Brandon Olivares
> -Original Message- > From: rspec-users-boun...@rubyforge.org [mailto:rspec-users- > boun...@rubyforge.org] On Behalf Of Pat Maddox > Sent: Sunday, April 19, 2009 4:10 AM > To: rspec-users > Subject: Re: [rspec-users] Custom Example Groups > > Check out http

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread David Chelimsky
On Sun, Apr 19, 2009 at 5:10 AM, Pat Maddox wrote: > Check out http://gist.github.com/97967 - top one is a custom example > group, and bottom one is accessing an example's instance var from > within a matcher. I forked this and modified it a bit: http://gist.github.com/98041 This shows how to se

Re: [rspec-users] Custom Example Groups

2009-04-19 Thread Pat Maddox
Check out http://gist.github.com/97967 - top one is a custom example group, and bottom one is accessing an example's instance var from within a matcher. Pat On Sat, Apr 18, 2009 at 11:31 PM, Brandon Olivares wrote: > Hi, > > I want to build a custom example group, but there really aren't any exa

[rspec-users] Custom Example Groups

2009-04-18 Thread Brandon Olivares
Hi, I want to build a custom example group, but there really aren't any examples anywhere for how to do so. The new chapter in The RSpec Book talks about it, but doesn't actually show an example, only how to register it. Looking at rspec-rails, I can see a pattern, but I don't know if that's spec