Re: [rspec-users] Shared Helpers

2010-02-23 Thread Nicolás Sanguinetti
On Tue, Feb 23, 2010 at 3:41 PM, Matt Wynne wrote: > > On 23 Feb 2010, at 17:30, Scott Taylor wrote: > >> >> Has there been any development on shared helpers / it_should_behave_like >> feature in rspec? >> >> I forget the reasons, but I remember a patch for something like this was >> rejected: >>

Re: [rspec-users] Shared Helpers

2010-02-23 Thread Pat Maddox
I just use a factory method. describe 'Authorize.net CIM gateway', :shared => true do describe 'saving a card' do describe 'preconditions' do it "should raise an error if the card is not saved" do lambda { gateway.save_credit_card(Factory.build(:credit_card, :user =>

Re: [rspec-users] Shared Helpers

2010-02-23 Thread Matt Wynne
On 23 Feb 2010, at 17:30, Scott Taylor wrote: Has there been any development on shared helpers / it_should_behave_like feature in rspec? I forget the reasons, but I remember a patch for something like this was rejected: it_should_behave_like "an_entry", :locals => { :entry => Entr

[rspec-users] Shared Helpers

2010-02-23 Thread Scott Taylor
Has there been any development on shared helpers / it_should_behave_like feature in rspec? I forget the reasons, but I remember a patch for something like this was rejected: it_should_behave_like "an_entry", :locals => { :entry => Entry.new } OR: before do @entry = Entry.new