1

I create the controller copy syllabus in trestle in:

app/admin/copy_syllabus.rb

This is my content

Trestle.admin(:copy_syllabus) do
   menu do
     item :copy_syllabus, icon: "fa fa-tachometer"
   end

   controller do
     def index

     end

     def create
     end
  end

So I need to add rspec test for this controller

I tried with this structure of files

rspec/admin/copy_syllabus_controller.rb

But when I run:

rspec spec 

show me the error

NameError:
  uninitialized constant Admin::CopySyllabusController
HalleyRios
  • 602
  • 1
  • 4
  • 18
  • Use a [request spec](https://relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec) instead of a controller spec. Request specs drive the whole stack and are more future proof. – max May 08 '19 at 17:54
  • Thanks for response, So how i implement login test in request with trestle?. Do you have a example? – HalleyRios May 08 '19 at 21:44

0 Answers0