kucaahbe / rspec-html-matchers

Old school have_tag, with_tag(and more) matchers for rspec 3 (Nokogiri powered)
http://rubygems.org/gems/rspec-html-matchers
MIT License
199 stars 90 forks source link

options for have_tag should also support Regexp #27

Closed iancanderson closed 10 years ago

iancanderson commented 10 years ago

For backwards compatibility with RSpec 1.x, have_tag should also allow Regexp as the second parameter. e.g.

"<h1>Title</h1>".should have_tag("h1", /itl/)

See http://old.rspec.info/rails/writing/views.html

kucaahbe commented 10 years ago

@iancanderson thanks, could you, please, add test for this functionality, so then I can merge.

iancanderson commented 10 years ago

@kucaahbe sure thing!

iancanderson commented 10 years ago

@kucaahbe specs are pushed and passing :smile: Any chance you could push a new version today so we can use the canonical gem? :pray:

kucaahbe commented 10 years ago

@iancanderson thanks for your efforts! New version pushed:)

iancanderson commented 10 years ago

Perfect! and thanks for the quick turnaround. Yay opensource!