Skip to content

Commit a5eb2d2

Browse files
author
Ara Hacopian
committed
Add explicit access control tags to docs
Prior to the commit, docs for both RSpec::Rails::Matchers#be_a_new and RSpec::Rails::Matchers#be_new_record incorrectly indicated that the methods were private. This commit corrects this issue, following the pattern used here: https://github.com/rspec/rspec-rails/blame/1fb6f9f642e887df1b1ee344594de02d7de3b3fe/lib/rspec/rails/matchers/have_http_status.rb#L329 (f6c277f) Fixes #1413
1 parent cb2dda8 commit a5eb2d2

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

lib/rspec/rails/matchers/be_a_new.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def unmatched_attributes
6060
end
6161
end
6262

63+
# @api public
6364
# Passes if actual is an instance of `model_class` and returns `false` for
6465
# `persisted?`. Typically used to specify instance variables assigned to
6566
# views by controller actions

lib/rspec/rails/matchers/be_new_record.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def failure_message_when_negated
1616
end
1717
end
1818

19+
# @api public
1920
# Passes if actual returns `false` for `persisted?`.
2021
#
2122
# @example

0 commit comments

Comments
 (0)