I am using 'mongoid-minitest' for writing test suite for my app I have successfully added test cases for models using this gem. I tried adding controller test cases.
users_controller_test.rb
require 'test_helper'
describe UsersController do
describe '#index' do
it 'render index view' do
get :index
end
end
end
But running command ruby -I test test/controllers/users_controller_test.rb
is throwing error: undefined method 'get' for #<#<Class:0x00000006592e68>:0x00000007a7d9b8>
when get :index
is executed.
Aucun commentaire:
Enregistrer un commentaire