Skip to content

Commit

Permalink
Documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
alindeman committed Jul 7, 2013
1 parent a77674b commit 87d1cf9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/rspec/rails/extensions/active_record/base.rb
Expand Up @@ -40,12 +40,12 @@ module ::ActiveModel::Validations
#
# @example
#
# model.should have(:no).errors_on(:attribute)
# model.should have(1).error_on(:attribute)
# model.should have(n).errors_on(:attribute)
# model.should have(n).errors_on(:attribute, :context => :create)
# expect(model).to have(:no).errors_on(:attribute)
# expect(model).to have(1).error_on(:attribute)
# expect(model).to have(n).errors_on(:attribute)
# expect(model).to have(n).errors_on(:attribute, :context => :create)
#
# model.errors_on(:attribute).should include("can't be blank")
# expect(model.errors_on(:attribute)).to include("can't be blank")
def errors_on(attribute, options = {})
valid_args = [options[:context]].compact
self.valid?(*valid_args)
Expand Down

0 comments on commit 87d1cf9

Please sign in to comment.