diff --git a/lib/capybara/helpers.rb b/lib/capybara/helpers.rb index 185d92bb..4994caf3 100644 --- a/lib/capybara/helpers.rb +++ b/lib/capybara/helpers.rb @@ -37,7 +37,7 @@ module Capybara # `Capybara.asset_host`. # # @param [String] html HTML code to inject into - # @param [String] The modified HTML code + # @return [String] The modified HTML code # def inject_asset_host(html) if Capybara.asset_host diff --git a/lib/capybara/node/actions.rb b/lib/capybara/node/actions.rb index 48542811..00a0bdec 100644 --- a/lib/capybara/node/actions.rb +++ b/lib/capybara/node/actions.rb @@ -44,8 +44,8 @@ module Capybara # # page.fill_in 'Name', :with => 'Bob' # - # @param [String] locator Which field to fill in - # @param [Hash{:with => String}] The value to fill in + # @param [String] locator Which field to fill in + # @param [Hash{:with => String}] options The value to fill in # def fill_in(locator, options={}) raise "Must pass a hash containing 'with'" if not options.is_a?(Hash) or not options.has_key?(:with) @@ -100,8 +100,8 @@ module Capybara # # page.select 'March', :from => 'Month' # - # @param [String] value Which option to select - # @param [Hash{:from => String}] The id, name or label of the select box + # @param [String] value Which option to select + # @param [Hash{:from => String}] options The id, name or label of the select box # def select(value, options={}) if options.has_key?(:from) @@ -120,8 +120,8 @@ module Capybara # # page.unselect 'March', :from => 'Month' # - # @param [String] value Which option to unselect - # @param [Hash{:from => String}] The id, name or label of the select box + # @param [String] value Which option to unselect + # @param [Hash{:from => String}] options The id, name or label of the select box # def unselect(value, options={}) if options.has_key?(:from) diff --git a/lib/capybara/node/element.rb b/lib/capybara/node/element.rb index c71be13a..9b77fd53 100644 --- a/lib/capybara/node/element.rb +++ b/lib/capybara/node/element.rb @@ -49,9 +49,8 @@ module Capybara # ignored. This behaviour can be overridden by passing `:all` to this # method. # - # @param [:all, :visible] Whether to return only visible or all text - # - # @return [String] The text of the element + # @param [:all, :visible] type Whether to return only visible or all text + # @return [String] The text of the element # def text(type=nil) type ||= :all unless Capybara.ignore_hidden_elements or Capybara.visible_text_only diff --git a/lib/capybara/node/finders.rb b/lib/capybara/node/finders.rb index 15c0c31a..7eb22e7c 100644 --- a/lib/capybara/node/finders.rb +++ b/lib/capybara/node/finders.rb @@ -137,7 +137,7 @@ module Capybara # @overload first([kind], locator, options) # @param [:css, :xpath] kind The type of selector # @param [String] locator The selector - # @param [Hash] options Additional options; see {all} + # @param [Hash] options Additional options; see {#all} # @return [Capybara::Element] The found element or nil # def first(*args) diff --git a/lib/capybara/node/matchers.rb b/lib/capybara/node/matchers.rb index b2be1003..3a6c3121 100644 --- a/lib/capybara/node/matchers.rb +++ b/lib/capybara/node/matchers.rb @@ -28,12 +28,12 @@ module Capybara # page.has_selector?(:xpath, XPath.descendant(:p)) # # @param (see Capybara::Node::Finders#all) - # @param options a customizable set of options - # @option options [Integer] :count (nil) Number of times the text should occur - # @option options [Integer] :minimum (nil) Minimum number of times the text should occur - # @option options [Integer] :maximum (nil) Maximum number of times the text should occur - # @option options [Range] :between (nil) Range of times that should contain number of times text occurs - # @return [Boolean] If the expression exists + # @param args + # @option args [Integer] :count (nil) Number of times the text should occur + # @option args [Integer] :minimum (nil) Minimum number of times the text should occur + # @option args [Integer] :maximum (nil) Maximum number of times the text should occur + # @option args [Range] :between (nil) Range of times that should contain number of times text occurs + # @return [Boolean] If the expression exists # def has_selector?(*args) assert_selector(*args) diff --git a/lib/capybara/node/simple.rb b/lib/capybara/node/simple.rb index 71a5fef5..4e4b6c9c 100644 --- a/lib/capybara/node/simple.rb +++ b/lib/capybara/node/simple.rb @@ -36,8 +36,8 @@ module Capybara # # element[:title] # => HTML title attribute # - # @param [Symbol] attribute The attribute to retrieve - # @return [String] The value of the attribute + # @param [Symbol] name The attribute name to retrieve + # @return [String] The value of the attribute # def [](name) attr_name = name.to_s diff --git a/lib/capybara/session.rb b/lib/capybara/session.rb index bdcf10bc..933adddd 100644 --- a/lib/capybara/session.rb +++ b/lib/capybara/session.rb @@ -325,7 +325,7 @@ module Capybara # # Save a snapshot of the page and open it in a browser for inspection # - # @param [String] path The path to where it should be saved [optional] + # @param [String] file_name The path to where it should be saved [optional] # def save_and_open_page(file_name=nil) require "launchy"