Re: [rspec-users] How to spec a around_filter

2009-03-26 Thread Alex
Works like a charm! Thanks a lot. On Mar 25, 9:59 pm, Chris Flipse wrote: > I havn't done this myself, but would > controller.stub!(:around_filter_method).and_yield  work? > > On Wed, Mar 25, 2009 at 4:15 PM, Alex wrote: > > Hi all, any of you guys had success specking out a around_filter? I >

Re: [rspec-users] How to spec a around_filter

2009-03-26 Thread Alex
Works like a charm! Thanks a lot. On Mar 25, 9:59 pm, Chris Flipse wrote: > I havn't done this myself, but would > controller.stub!(:around_filter_method).and_yield  work? > > On Wed, Mar 25, 2009 at 4:15 PM, Alex wrote: > > Hi all, any of you guys had success specking out a around_filter? I >

[rspec-users] [ANN] assert2-0.4.6 provides assert_xhtml, an alternative to assert_select

2009-03-26 Thread Phlip
Rubyists: Consider the following monstrosity, coded using assert_select: assert_select "div#logo_box img[src=//0001/logo.gif][alt=My Company]" Now, behold it rewritten to use assert_xhtml: assert_xhtml do div.logo_box! do img :src => /logo.gif$/, :alt => 'My Company' end

Re: [rspec-users] what's the different between ( [...@weather]) and (@weather)?

2009-03-26 Thread Andrea Jahn
Hi, Weather.find(1) returns an object: @weather Weather.find(:all) returns an array of objects : [...@weather] look at the api of ActiveRecordBase. http://api.rubyonrails.org/classes/ActiveRecord/Base.html [http://api.rubyonrails.org/classes/ActiveRecord/Base.html] You have not specified