Skip to content

Commit 87d1cf9

Browse files
committed
Documentation updates
1 parent a77674b commit 87d1cf9

File tree

1 file changed

+5
-5
lines changed
  • lib/rspec/rails/extensions/active_record

1 file changed

+5
-5
lines changed

lib/rspec/rails/extensions/active_record/base.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ module ::ActiveModel::Validations
4040
#
4141
# @example
4242
#
43-
# model.should have(:no).errors_on(:attribute)
44-
# model.should have(1).error_on(:attribute)
45-
# model.should have(n).errors_on(:attribute)
46-
# model.should have(n).errors_on(:attribute, :context => :create)
43+
# expect(model).to have(:no).errors_on(:attribute)
44+
# expect(model).to have(1).error_on(:attribute)
45+
# expect(model).to have(n).errors_on(:attribute)
46+
# expect(model).to have(n).errors_on(:attribute, :context => :create)
4747
#
48-
# model.errors_on(:attribute).should include("can't be blank")
48+
# expect(model.errors_on(:attribute)).to include("can't be blank")
4949
def errors_on(attribute, options = {})
5050
valid_args = [options[:context]].compact
5151
self.valid?(*valid_args)

0 commit comments

Comments
 (0)