In Rails 5, is setup called each time test is run? -
let's have code below in model test.
def setup @object = object.new(name: "test") end test "test 1" @object.age = 25 assert @object.valid? end test "test 1" ... end ...
is setup
method called before each test
done or called once , proceeds run tests?
the setup
method run before each test case. minitest documentation says:
runs before every test. use set before each test run.
Comments
Post a Comment