Re: [rspec-users] matcher for bad request

2010-03-31 Thread David Chelimsky
On Apr 1, 2010, at 1:30 AM, drewB wrote: > Is there a built-in matcher for a response returning a bad request > (e.g. header code in the 400s)? For example, "response.should > be_bad_request". No, but its dead simple to write your own: Spec::Matchers.define :be_bad_request do match do |respon

[rspec-users] matcher for bad request

2010-03-31 Thread drewB
Is there a built-in matcher for a response returning a bad request (e.g. header code in the 400s)? For example, "response.should be_bad_request". ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] subject in the before block?

2010-03-31 Thread Brian Cardarella
RSpec 1 and before :each On Mar 31, 5:33 pm, David Chelimsky wrote: > On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote: > > > Is there a reason why I cannot access the subject in the before block? > > It seems to me that anything that I have access to in the it blocks > > should also be access

Re: [rspec-users] help me refactor a step for finding href in specific link

2010-03-31 Thread David Chelimsky
On Mar 31, 2010, at 5:13 PM, Oren Golan wrote: > I want to verify the href is correct: > >http://www.com.com";>Website > > > my step in the cucumber file: > And the "website" class should have "www.happyhour.com" > > the step definition: > Then /^the "([^\"]*)" class should have "([^\"]*)"

[rspec-users] help me refactor a step for finding href in specific link

2010-03-31 Thread Oren Golan
I want to verify the href is correct: http://www.com.com";>Website my step in the cucumber file: And the "website" class should have "www.happyhour.com" the step definition: Then /^the "([^\"]*)" class should have "([^\"]*)"$/ do |link, url| response.should have_selector(".#{link}") do |

Re: [rspec-users] subject in the before block?

2010-03-31 Thread David Chelimsky
On Mar 31, 2010, at 3:54 PM, Brian Cardarella wrote: > Is there a reason why I cannot access the subject in the before block? > It seems to me that anything that I have access to in the it blocks > should also be accessible in the before block. No reason. You using rspec 1 or 2? Also, before(:eac

[rspec-users] subject in the before block?

2010-03-31 Thread Brian Cardarella
Is there a reason why I cannot access the subject in the before block? It seems to me that anything that I have access to in the it blocks should also be accessible in the before block. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyfor

Re: [rspec-users] Spork

2010-03-31 Thread Ben Mabey
Ashley Moran wrote: On Mar 29, 2010, at 9:04 pm, David Chelimsky wrote: How wide-reaching are your changes? i.e. how many files, etc? I think it's only really the Runner stuff that's changed. I've split it into InProcess and DRbProxy or some such... although I think really the DRb s

Re: [rspec-users] Best way to match several attributes of an object?

2010-03-31 Thread Pat Maddox
On Mar 30, 2010, at 7:23 AM, George wrote: > When you need to check several properties of an object, what is the > best way to match them all? > > I'm using the 'satisfy' matcher at the moment but perhaps there's a > better way than this: > flight.should satisfy { |f| >f.booking_code

Re: [rspec-users] autotest - garbled output

2010-03-31 Thread David Chelimsky
More FYI: Ryan released ZenTest 4.3.1 yesterday to address this issue, so you can upgrade to the latest and greatest. On Tue, Mar 30, 2010 at 2:53 PM, David Chelimsky wrote: > FYI - I uninstalled ZenTest-4.3.0 and installed ZenTest-4.2.1 and all is well: > > [sudo] gem uninstall ZenTest > [sudo]

Re: [rspec-users] Spork

2010-03-31 Thread Ashley Moran
On Mar 29, 2010, at 9:04 pm, David Chelimsky wrote: > How wide-reaching are your changes? i.e. how many files, etc? I think it's only really the Runner stuff that's changed. I've split it into InProcess and DRbProxy or some such... although I think really the DRb stuff belongs higher up. >