Re: [rspec-users] color option

2012-03-07 Thread Justin Ko
On Feb 27, 2012, at 10:58 AM, jed schneider wrote: > we are on rspec 2.6.4 and for awhile my color flag seems to be ignored when > running specs in my .rspec file but my formatting option is picking up. Did > the --color flag get changed? > > my .rspec file > --color > -f d > > thanks! > >

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 18:26, Zach Dennis wrote: > Matt, > > I have typically done what you are already doing, but I am also > interested in the answer you seek. Another idea might be something > like since #do-stuff would need to be invoked with a block: > > expect(thing, :do_stuff).to_yield val

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread David Chelimsky
On Wed, Mar 7, 2012 at 2:32 PM, Matt Wynne wrote: > > On 7 Mar 2012, at 18:16, David Chelimsky wrote: > > On Wed, Mar 7, 2012 at 11:56 AM, Matt Wynne wrote: > > > On 7 Mar 2012, at 11:39, Morten Møller Riis wrote: > > > On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: > > > > Hi all, > > > I'm spec'

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 18:16, David Chelimsky wrote: > On Wed, Mar 7, 2012 at 11:56 AM, Matt Wynne wrote: >> >> On 7 Mar 2012, at 11:39, Morten Møller Riis wrote: >> >> On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: >> >> >> Hi all, >> >> I'm spec'ing a method that yields a value. Right now, I sp

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Zach Dennis
Matt, I have typically done what you are already doing, but I am also interested in the answer you seek. Another idea might be something like since #do-stuff would need to be invoked with a block: expect(thing, :do_stuff).to_yield val Zach On Wed, Mar 7, 2012 at 12:56 PM, Matt Wynne wrote:

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread David Chelimsky
On Wed, Mar 7, 2012 at 11:56 AM, Matt Wynne wrote: > > On 7 Mar 2012, at 11:39, Morten Møller Riis wrote: > > On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: > > > Hi all, > > I'm spec'ing a method that yields a value. Right now, I spec it like this: > >     result = nil >     thing.do_stuff { |valu

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread David Chelimsky
On Wed, Mar 7, 2012 at 11:53 AM, Matt Wynne wrote: > > On 7 Mar 2012, at 15:12, Ken Chien wrote: > > Hi Matt, > On Wed, Mar 7, 2012 at 2:22 AM, Matt Wynne wrote: >> >> Hi all, >> >> I'm spec'ing a method that yields a value. Right now, I spec it like this: >> >>     result = nil >>     thing.do_s

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 15:12, Ken Chien wrote: > Hi Matt, > On Wed, Mar 7, 2012 at 2:22 AM, Matt Wynne wrote: > Hi all, > > I'm spec'ing a method that yields a value. Right now, I spec it like this: > > result = nil > thing.do_stuff { |value| result = value } > result.should == expecte

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Matt Wynne
On 7 Mar 2012, at 11:39, Morten Møller Riis wrote: > On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: > >> Hi all, >> >> I'm spec'ing a method that yields a value. Right now, I spec it like this: >> >> result = nil >> thing.do_stuff { |value| result = value } >> result.should == expec

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Ken Chien
Hi Matt, On Wed, Mar 7, 2012 at 2:22 AM, Matt Wynne wrote: > Hi all, > > I'm spec'ing a method that yields a value. Right now, I spec it like this: > > result = nil > thing.do_stuff { |value| result = value } > result.should == expected > > This feels like too much ceremony. What I wa

Re: [rspec-users] Asserting on a yield

2012-03-07 Thread Morten Møller Riis
How about this? thing.do_stuff(&:to_s).should == expected Best regards Morten Møller Riis On Mar 7, 2012, at 8:22 AM, Matt Wynne wrote: > Hi all, > > I'm spec'ing a method that yields a value. Right now, I spec it like this: > > result = nil > thing.do_stuff { |value| result = valu