Thanks!

On Mar 31, 11:37 pm, David Chelimsky <[email protected]> wrote:
> 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 |response|
>     response.code.to_s =~ /^4/
>   end
> end
>
> _______________________________________________
> rspec-users mailing list
> [email protected]http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to