Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: 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. Add this monkey patch below require 'assert2/xhtml': class BeHtmlWith def matches?(stwing, &block) @block ||= block @scope.wrap

[rspec-users] RSpec Formats with Strange Characters

2009-04-04 Thread Brandon Olivares
Hi, Sorry for another post. I have spec.opts writing certain formats to certain files. It looks like this: --colour --format progress --format nested:doc/nested.txt --format profile:doc/profile.txt --loadby mtime --reverse So I took a look at doc/nested.txt, and it shows the following: /contact

[rspec-users] Best practices: How small to make examples?

2009-04-04 Thread Brandon Olivares
Hi, How small should examples be? Let's say I have a form, should there be one example per field? If there's a dropdown, should I describe the dropdown and have one example per option? I thought that at first but now, because of the duplication and sheer verbosity, it seems too much. So what do

Re: [rspec-users] Problems installing the rspec and rspec-rails gems

2009-04-04 Thread David Chelimsky
Hey Mike, Looks like the problem is installing the rdoc. Try installing with the --no-rdoc option. Cheers, David Sent from my iPhone On Apr 4, 2009, at 7:52 PM, Mike Williams wrote: Pat Maddox wrote: The rspec gem did install successfully, not sure what those doc warnings are. Did you

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: 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. i dunno about "natural language", but I expect to fix the RSpec language this weekend. (-; ___

Re: [rspec-users] Problems installing the rspec and rspec-rails gems

2009-04-04 Thread Mike Williams
Pat Maddox wrote: > The rspec gem did install successfully, not sure what those doc > warnings are. Did you install rspec-rails as well? > > Pat I get the same output with rspec-rails when I try to install it. When I try to run cucumber feature -n I get: Missing these required gems: rpsec

Re: [rspec-users] Problems installing the rspec and rspec-rails gems

2009-04-04 Thread Pat Maddox
The rspec gem did install successfully, not sure what those doc warnings are. Did you install rspec-rails as well? Pat On Sat, Apr 4, 2009 at 4:08 PM, Mike Williams wrote: > Hello, > > Just purchased my first mac for Ruby on Rails development and I'm in the > process of setting up the environme

[rspec-users] Problems installing the rspec and rspec-rails gems

2009-04-04 Thread Mike Williams
Hello, Just purchased my first mac for Ruby on Rails development and I'm in the process of setting up the environment and installing rspec and rspec-rails. I'm getting the following error message when trying to install the gem. I'm using: sudo gem install rspec I get: Successfully installed rsp

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
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-boun...@rubyforge.org [mailto:rspec-user

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
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

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
Phlip, Well, now it's not failing if there is an error. This passes: it "should have a subject dropdown box" do response.body.should be_html_with { form.contact! do label 'Subject' select!.subject! end } end # it "should have

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
Phlip, Wow thank you very much. Sorry for the double post, I originally accidently sent my post from another email address. Anyway, that'll be a lot better, and more refined than my previous syntax. Also I really like your RJS assertions. I'll have to test that out when I get to using AJAX. Th

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Brandon Olivares wrote: I just found a custom matcher created by Phlip at http://gist.github.com/76136 That's just a sketch. The real deal is at... gem install nokogiri assert2 require 'assert2/xhtml' Report if that works better. You might find its inside source code is a little nicer,

Re: [rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Phlip
Uh oh. select! :id => 'subject' select!.subject! ! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Phlip's be_html_with was RE: Problem with Custom matcher and Blocks

2009-04-04 Thread Brandon Olivares
Hi, I just found a custom matcher created by Phlip at http://gist.github.com/76136 So I added that to my project, and it mostly works great for what I'm trying to do, and the syntax is pretty nice. But anytime I try to use select, I get an error. I wonder if it's conflicting with another method