Skip to content

Commit

Permalink
More minor RDoc tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
brynary committed Nov 25, 2008
1 parent 2eefcf5 commit e822535
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions lib/webrat.rb
Expand Up @@ -3,6 +3,7 @@
$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

Expand Down
6 changes: 4 additions & 2 deletions lib/webrat/core/configuration.rb
Expand Up @@ -12,14 +12,16 @@ def self.configuration
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
Expand Down
1 change: 1 addition & 0 deletions lib/webrat/core/field.rb
Expand Up @@ -3,6 +3,7 @@
require "webrat/core_extensions/nil_to_param"

module Webrat
# Raised when Webrat is asked to manipulate a disabled form field
class DisabledFieldError < WebratError
end

Expand Down
3 changes: 1 addition & 2 deletions lib/webrat/core/matchers/have_tag.rb
Expand Up @@ -3,7 +3,6 @@ module Webrat
module HaveTagMatcher

class HaveTag < ::Webrat::Matchers::HaveSelector #:nodoc:

# ==== Returns
# String:: The failure message.
def failure_message
Expand Down Expand Up @@ -46,12 +45,12 @@ def query

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
Expand Down
3 changes: 1 addition & 2 deletions lib/webrat/core/scope.rb
Expand Up @@ -3,6 +3,7 @@
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

Expand Down Expand Up @@ -238,9 +239,7 @@ def click_area(area_name)
#
# 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)
Expand Down
4 changes: 1 addition & 3 deletions lib/webrat/core/session.rb
Expand Up @@ -4,6 +4,7 @@
require "webrat/core/mime"

module Webrat
# A page load or form submission returned an unsuccessful response code (500-599)
class PageLoadError < WebratError
end

Expand Down Expand Up @@ -132,9 +133,6 @@ def current_scope #:nodoc:

# 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
Expand Down

0 comments on commit e822535

Please sign in to comment.