module RSpec::HtmlMatchers
def with_button text, value=nil, options={}
def with_button text, value=nil, options={} options[:with] ||= {} if value.is_a?(Hash) options.merge!(value) value=nil end options[:with].merge!(:value => value.to_s) if value options.merge!(:text => text) if text expect(@__current_scope_for_nokogiri_matcher).to have_tag('button', options) end