Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregschmit committed Jul 1, 2023
1 parent 247f915 commit b8a77a5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions test/test/controllers/api/test/base.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
require "test_helper"

module BaseApi::TestControllerTests
def self.included(base)
base.setup { Rails.application.load_seed }
module BaseApi
module TestControllerTests
def self.included(base)
base.setup { Rails.application.load_seed }
end
end
end
6 changes: 3 additions & 3 deletions test/test/unit/generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_controller_failure
end

def test_controller
path = "test_api/testa"
path = "api/test/testa"
filename = "app/controllers/#{path}_controller.rb"
_suppress_stdout do
Rails::Generators.invoke("rest_framework:controller", [path])
Expand All @@ -42,7 +42,7 @@ class Api::Test::TestaController < ApplicationController
end

def test_controller_with_include_base
path = "test_api/testb"
path = "api/test/testb"
filename = "app/controllers/#{path}_controller.rb"
_suppress_stdout do
Rails::Generators.invoke("rest_framework:controller", [path, "--include-base"])
Expand All @@ -59,7 +59,7 @@ class Api::Test::TestbController < ApplicationController
end

def test_controller_with_parent_class
path = "test_api/testc"
path = "api/test/testc"
filename = "app/controllers/#{path}_controller.rb"
_suppress_stdout do
Rails::Generators.invoke(
Expand Down

0 comments on commit b8a77a5

Please sign in to comment.