Skip to content

Commit

Permalink
Merge pull request #1752 from rspec/address-yard-warnings
Browse files Browse the repository at this point in the history
Address yard warnings
  • Loading branch information
myronmarston committed Oct 30, 2014
2 parents 5c47c51 + a4e32e5 commit b9b9ce6
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 14 deletions.
35 changes: 27 additions & 8 deletions lib/rspec/core/example_group.rb
Expand Up @@ -88,9 +88,20 @@ def described_class
# @private
# @macro [attach] define_example_method
# @!scope class
# @param name [String]
# @param extra_options [Hash]
# @param implementation [Block]
# @overload $1
# @overload $1(&example_implementation)
# @param example_implementation [Block] The implementation of the example.
# @overload $1(doc_string, *metadata_keys, metadata={})
# @param doc_string [String] The example's doc string.
# @param metadata [Hash] Metadata for the example.
# @param metadata_keys [Array<Symbol>] Metadata tags for the example.
# Will be transformed into hash entries with `true` values.
# @overload $1(doc_string, *metadata_keys, metadata={}, &example_implementation)
# @param doc_string [String] The example's doc string.
# @param metadata [Hash] Metadata for the example.
# @param metadata_keys [Array<Symbol>] Metadata tags for the example.
# Will be transformed into hash entries with `true` values.
# @param example_implementation [Block] The implementation of the example.
# @yield [Example] the example object
# @example
# $1 do
Expand All @@ -99,6 +110,9 @@ def described_class
# $1 "does something" do
# end
#
# $1 "does something", :slow, :uses_js do
# end
#
# $1 "does something", :with => 'additional metadata' do
# end
#
Expand Down Expand Up @@ -166,12 +180,17 @@ def self.define_example_method(name, extra_options={})
# @!group Defining Example Groups

# @private
# @macro [attach] alias_example_group_to
# @macro [attach] define_example_group_method
# @!scope class
# @param name [String] The example group doc string
# @param metadata [Hash] Additional metadata to attach to the example
# group
# @yield The example group definition
# @overload $1
# @overload $1(&example_group_definition)
# @param example_group_definition [Block] The definition of the example group.
# @overload $1(doc_string, *metadata_keys, metadata={}, &example_implementation)
# @param doc_string [String] The group's doc string.
# @param metadata [Hash] Metadata for the group.
# @param metadata_keys [Array<Symbol>] Metadata tags for the group.
# Will be transformed into hash entries with `true` values.
# @param example_group_definition [Block] The definition of the example group.
#
# Generates a subclass of this example group which inherits
# everything except the examples themselves.
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec/core/formatters/base_formatter.rb
Expand Up @@ -45,7 +45,7 @@ def example_group_started(notification)

# @api public
#
# @param notification [NullNotification]
# @param _notification [NullNotification] (Ignored)
# @see RSpec::Core::Formatters::Protocol#close
def close(_notification)
restore_sync_output
Expand Down
5 changes: 1 addition & 4 deletions lib/rspec/core/formatters/base_text_formatter.rb
Expand Up @@ -14,7 +14,6 @@ class BaseTextFormatter < BaseFormatter
Formatters.register self,
:message, :dump_summary, :dump_failures, :dump_pending, :seed

# @method message
# @api public
#
# Used by the reporter to send messages to the output stream.
Expand All @@ -24,7 +23,6 @@ def message(notification)
output.puts notification.message
end

# @method dump_failures
# @api public
#
# Dumps detailed information about each example failure.
Expand All @@ -35,7 +33,6 @@ def dump_failures(notification)
output.puts notification.fully_formatted_failed_examples
end

# @method dump_summary
# @api public
#
# This method is invoked after the dumping of examples and failures.
Expand Down Expand Up @@ -64,7 +61,7 @@ def seed(notification)
# Invoked at the very end, `close` allows the formatter to clean
# up resources, e.g. open streams, etc.
#
# @param notification [NullNotification]
# @param _notification [NullNotification] (Ignored)
def close(_notification)
return unless IO === output
return if output.closed? || output == $stdout
Expand Down
1 change: 0 additions & 1 deletion lib/rspec/core/formatters/profile_formatter.rb
Expand Up @@ -15,7 +15,6 @@ def initialize(output)
# @private
attr_reader :output

# @method dump_profile
# @api public
#
# This method is invoked after the dumping the summary if profiling is
Expand Down

0 comments on commit b9b9ce6

Please sign in to comment.