Open lioneldebauge opened 1 year ago
Hi @lioneldebauge, sorry for the delay. It is possible to use this without shoulda-context
, yes. I haven't tried it, but others have found success using the minitest-matchers_vaccine
gem. See: https://github.com/thoughtbot/shoulda-matchers/issues/825#issuecomment-276866714.
Hope that helps!
@mcmire you just made my day. Thanks a lot for your answer ! Should we modify the documentation to include a reference ? I can open a PR if needed.
For reference for others who might need it. I'm using Minitest::Spec::DSL
# in a helper file
def assert_must(matcher, subject, msg = nil)
assert matcher.matches?(subject), msg
end
# in a model file
describe("validations")
let(:user) { User.new }
it { assert_must validates_presence_of :name, user }
end
Hello 👋
My team is looking into adding
shoulda-matchers
to our Minitest test suite. Is it possible to useshoulda-matchers
withoutshoulda-context
gem ? If so what is the recommended way ?Documentation suggests it in "Getting Started" section below but all examples assume the usage of
should
method.https://matchers.shoulda.io/docs/v5.3.0/#minitest
Thanks for any help that you would be willing to give us and for this very useful gem 🙏