Rspec assigns equivalent in unit test/minitest -
is there rspec assigns
equivalent in minitest::test
? if not how can check instant controller instant variable in tests. using sinatra
the assigns
method comes rails, not rspec or minitest. works same.
the following example rails testing guide:
class postscontrollertest < actioncontroller::testcase test "should index" :index assert_response :success assert_not_nil assigns(:posts) end end
Comments
Post a Comment