I am using Forem for a project, and I've added a couple actions to the built in PostsController under app/decorators/controllers/forem/posts_controller_decorator.rb. I want to write a test using Test::Unit for this controller, but I can't seem to figure out how to do so.
I tried something like:
require 'test_helper'
module Forem
class PostsControllerTest < ActionController::TestCase
test 'GET :my_route'
get :my_route
assert_response :success
end
end
end
but it doesn't seem to work.
Has anyone written tests for a similar engine or even Forem?
Aucun commentaire:
Enregistrer un commentaire