No description, website, or topics provided.
Ruby JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
config
db
doc
lib
log
public
script
test
vendor
.gitignore
Gemfile
Gemfile.lock
README.rdoc
Rakefile
config.ru

README.rdoc

Demo of an error when trying to use shoulda for model validation

Is this error possibly related to this change: github.com/thoughtbot/shoulda-matchers/issues/108

Steps to Reproduce the Error:

  1. Clone this repository

  2. bundle install

  3. rake db:migrate

  4. rake

  5. Notice the error message:

test: User should require name to be set. (UserTest):
NoMethodError: undefined method `failure_message' for #<Shoulda::Matchers::ActiveModel::ValidatePresenceOfMatcher:0x007fd90d9bcf60>
    [...]/gems/shoulda-context-1.0.2/lib/shoulda/context/assertions.rb:60:in `assert_accepts'
    [...]/gems/shoulda-context-1.0.2/lib/shoulda/context/context.rb:332:in `block in should'
    [...]/gems/shoulda-context-1.0.2/lib/shoulda/context/context.rb:398:in `call'
    [...]/gems/shoulda-context-1.0.2/lib/shoulda/context/context.rb:398:in `block in create_test_from_should_hash'
    [...]/gems/mocha-0.13.3/lib/mocha/integration/mini_test/version_230_to_2101.rb:36:in `run'