ControllerMacros cannot be seen in RSpec
I have a Rails app and I am trying to test it. I use devise to log in. However, I faced a problem that occurs when I want to test: Users/ender/Projects/ratingw/spec/controllers/widgets_controller_spec.rb:4:in `block in <top (required)>': undefined local variable or method `login_user' for #<Class:0x007fe909bd5070> (NameError) First, I want to say that I read this devise formal tutorial . My spec_helper.rb is: # This file is copied to spec/ when you run 'rails generate rspec:install' ENV["RAILS_ENV"] ||= 'test' require File.expand_path("../../config/environment", __FILE__) require 'rspec/rails'