More minor RDoc tweaks
This commit is contained in:
parent
2eefcf5060
commit
e822535b6e
@ -3,6 +3,7 @@ require "rubygems"
|
||||
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
|
||||
|
||||
module Webrat
|
||||
# The common base class for all exceptions raised by Webrat.
|
||||
class WebratError < StandardError
|
||||
end
|
||||
|
||||
|
@ -12,14 +12,16 @@ module Webrat
|
||||
end
|
||||
|
||||
class Configuration
|
||||
# Should XHTML be parsed with Nokogiri? Defaults to true, except on JRuby. When false, Hpricot and REXML are used
|
||||
attr_writer :parse_with_nokogiri
|
||||
|
||||
# Webrat's mode, set automatically when requiring webrat/rails, webrat/merb, etc.
|
||||
attr_accessor :mode
|
||||
|
||||
# Sets whether to save and open pages with error status codes in a browser
|
||||
# Save and open pages with error status codes (500-599) in a browser? Defualts to true.
|
||||
attr_writer :open_error_files
|
||||
|
||||
def initialize
|
||||
def initialize # :nodoc:
|
||||
self.open_error_files = true
|
||||
self.parse_with_nokogiri = !Webrat.on_java?
|
||||
end
|
||||
|
@ -3,6 +3,7 @@ require "webrat/core_extensions/blank"
|
||||
require "webrat/core_extensions/nil_to_param"
|
||||
|
||||
module Webrat
|
||||
# Raised when Webrat is asked to manipulate a disabled form field
|
||||
class DisabledFieldError < WebratError
|
||||
end
|
||||
|
||||
|
@ -3,7 +3,6 @@ module Webrat
|
||||
module HaveTagMatcher
|
||||
|
||||
class HaveTag < ::Webrat::Matchers::HaveSelector #:nodoc:
|
||||
|
||||
# ==== Returns
|
||||
# String:: The failure message.
|
||||
def failure_message
|
||||
@ -46,12 +45,12 @@ module Webrat
|
||||
|
||||
Nokogiri::CSS::Parser.parse(selector).map { |ast| ast.to_xpath }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
def have_tag(name, attributes = {}, &block)
|
||||
HaveTag.new([name, attributes], &block)
|
||||
end
|
||||
|
||||
alias_method :match_tag, :have_tag
|
||||
|
||||
end
|
||||
|
@ -3,6 +3,7 @@ require "webrat/core/locators"
|
||||
require "webrat/core_extensions/deprecate"
|
||||
|
||||
module Webrat
|
||||
# An HTML element (link, button, field, etc.) that Webrat expected was not found on the page
|
||||
class NotFoundError < WebratError
|
||||
end
|
||||
|
||||
@ -238,9 +239,7 @@ module Webrat
|
||||
#
|
||||
# Example:
|
||||
# click_link "Sign up"
|
||||
#
|
||||
# click_link "Sign up", :javascript => false
|
||||
#
|
||||
# click_link "Sign up", :method => :put
|
||||
def click_link(text_or_title_or_id, options = {})
|
||||
find_link(text_or_title_or_id).click(options)
|
||||
|
@ -4,6 +4,7 @@ require "ostruct"
|
||||
require "webrat/core/mime"
|
||||
|
||||
module Webrat
|
||||
# A page load or form submission returned an unsuccessful response code (500-599)
|
||||
class PageLoadError < WebratError
|
||||
end
|
||||
|
||||
@ -132,9 +133,6 @@ module Webrat
|
||||
|
||||
# Reloads the last page requested. Note that this will resubmit forms
|
||||
# and their data.
|
||||
#
|
||||
# Example:
|
||||
# reloads
|
||||
def reloads
|
||||
request_page(@current_url, @http_method, @data)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user