Permalink
Browse files

Avoid RSpec warning by providing a default example description

  • Loading branch information...
dnagir committed Oct 6, 2011
1 parent fea21fc commit 21bdafdcfd4bd34f7cebab8111f949c218dff7be
Showing with 11 additions and 0 deletions.
  1. +11 −0 lib/webrat/core/matchers/have_selector.rb
@@ -4,6 +4,17 @@ module Webrat
module Matchers
class HaveSelector < HaveXpath #:nodoc:
+
+ # ==== Returns
+ # String:: The default description for the spec when it is not provided.
+ def description
+ "have selector #{@expected.inspect}" + if @options && @options.any?
+ " with #{@options.inspect}"
+ else
+ ''
+ end
+ end
+
# ==== Returns
# String:: The failure message.
def failure_message

0 comments on commit 21bdafd

Please sign in to comment.