[rspec-users] Parameterised shared examples / metadata in examples (RSpec 2)

2010-07-23 Thread Ashley Moran
Hi Warning: this goes on quite a bit. It contains early-morning caffeinated ramblings and many "hmmm I wonder what this does..." snippets. I'm looking for the best way to parameterise shared examples. Imagine (as an academic example...) you were doing it for subclasses of Struct instances (a

Re: [rspec-users] Parameterised shared examples / metadata in examples (RSpec 2)

2010-07-23 Thread Wincent Colaiuta
El 23/07/2010, a las 09:09, Ashley Moran escribió: > I'm looking for the best way to parameterise shared examples. Imagine (as an > academic example...) you were doing it for subclasses of Struct instances (a > more realistic example might be ActiveRecord subclasses, or DataMapper > resources)

Re: [rspec-users] Parameterised shared examples / metadata in examples (RSpec 2)

2010-07-23 Thread Ashley Moran
On Jul 23, 2010, at 8:57 am, Wincent Colaiuta wrote: > Recently commited (RSpec 2.0.0.beta.18) was the ability to pass a block to > "it_should_behave_like", making the relation clearer; eg: > > describe MyStruct do >it_should_behave_like 'a Struct' do > let(:struct) { MyStruct.new } >

[rspec-users] Check out my shelves

2010-07-23 Thread Varchar
Hi rspec, Check out the books I added on Goodreads. http://www.goodreads.com/friend/i?n=rspec users&e=rspec-us...@rubyforge.org&i=LTM2MDMwNTExMjM6MzY1 - Varchar (charlesmbow...@gmail.com) Goodreads is a community for book lovers. It's a great way to get book recommendations fr

Re: [rspec-users] Check out my shelves

2010-07-23 Thread David Chelimsky
On Fri, Jul 23, 2010 at 10:47 AM, Varchar wrote: > Hi rspec, > > Check out the books I added on Goodreads. All, please do what you can to keep this sort of spam from coming to this list. That means when you sign up for services and have them email all your contacts, you need to make sure this lis

Re: [rspec-users] [Rails] Stubbed static methods are bleeding over into other specs and making them fail

2010-07-23 Thread Patrick Gannon
> > I just got a chance to try this, and ran into more problems. Prior to > trying this, we were running RSpec2 beta 13. When I changed our Gemfile to > depend on 'edge' RSpec et al (as you suggested above), I get a very strange > error when I run rake (after doing a 'bundle install'). The same

[rspec-users] newbie: how to preserve NoMethodError under stubbing?

2010-07-23 Thread Lille
Hi, I've been browsing the RSpec book and the RDoc, but I can't see how to ensure the following: Stub an instance with a method it doesn't have and raise NoMethodError (or something like it.) I want to do this because I don't want to use incorrect names for my dependency methods... Thanks, Lil

Re: [rspec-users] newbie: how to preserve NoMethodError under stubbing?

2010-07-23 Thread David Chelimsky
On Fri, Jul 23, 2010 at 6:46 PM, Lille wrote: > Hi, > > I've been browsing the RSpec book and the RDoc, but I can't see how to > ensure the following: > > Stub an instance with a method it doesn't have and raise NoMethodError > (or something like it.) RSpec doesn't support anything like that. I'm