[rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks
Brandon Olivares
programmer2188 at gmail.com
Sat Apr 4 16:07:47 EDT 2009
Hi,
Yes that's great! That works perfectly.
I'd appreciate it if you could let me know about the be_html_with issue when
you can though, as I like the natural language better.
Thank you very much.
Brandon
> -----Original Message-----
> From: rspec-users-bounces at rubyforge.org [mailto:rspec-users-
> bounces at rubyforge.org] On Behalf Of Phlip
> Sent: Saturday, April 04, 2009 1:46 PM
> To: rspec-users at rubyforge.org
> Subject: Re: [rspec-users] Phlip's be_html_with was RE: Problem with
> Custom matcher and Blocks
>
> Brandon Olivares wrote:
>
> > it "should have a name field" do
> > response.body.should be_html_with {
> > form.contact! do
> > label 'Name'
> > input.name!
> > end
> > }
> > end # it "should have a name field"
> >
> > There is most definitely not a name field, nor its associated label.
>
> Can you try the assert_xhtml version? I think it will drop in with:
>
> Spec::Runner.configure do |c|
> c.include Test::Unit::Assertions
> end
>
> be_html_with{} is something of a nail-soup issue for me because we
> always only
> use test/unit at my day job... sorry!
>
> I will look at the issue this weekend - the @failure_message might not
> bubble up
> to the RSpec wrapper correctly...
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
More information about the rspec-users
mailing list