lib/rspec_api_docs/formatter.rb in rspec-api-docs-0.7.0 vs lib/rspec_api_docs/formatter.rb in rspec-api-docs-0.8.0

- old
+ new

@@ -31,17 +31,17 @@ def example_passed(example_notification) rspec_example = example_notification.example return unless rspec_example.metadata[METADATA_NAMESPACE] resource = Resource.new(rspec_example) resources[resource.name] ||= resource - resources[resource.name].examples << Resource::Example.new(rspec_example) + resources[resource.name].add_example Resource::Example.new(rspec_example) end # Calls the configured renderer with the stored {Resource}s. # # @return [void] def close(null_notification) - renderer.new(resources.values).render + renderer.new(resources.values.sort_by(&:name)).render end private def renderer