Created
October 27, 2017 12:57
-
-
Save skatkov/984165cb80cfb37c37b74dec03b48f62 to your computer and use it in GitHub Desktop.
TypeError: superclass mismatch for class UsersController
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#file: app/controllers/tsheets/users_controller.rb | |
module Tsheets | |
class UsersController < ApplicationController | |
def update | |
# does something important here | |
render json: 'test: test' | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file: test/controller/tsheets_users_controller_test.rb | |
require 'test_helper' | |
require_relative '../../app/controllers/tsheets/users_controller' | |
class Tsheets::UsersController < ActionController::TestCase | |
setup do | |
@user = users(:one) | |
sign_in(@user) | |
end | |
test "#update" do | |
get :update, format: :json | |
assert_response :success | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file: app/controllers/users_controller.rb | |
class UsersController < ApplicationController | |
def index | |
end | |
def show | |
end | |
end |
i have a same error , can you please tell me the solution
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Error I received then running this test.