Skip to content

Commit

Permalink
only test rake task for Rails < 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhawksley committed Aug 27, 2024
1 parent 42d7610 commit e12d2a6
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/sandbox/test/rake_tasks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@

require "test_helper"

module ViewComponent
class RakeTasksTest < TestCase
def setup
Kernel.silence_warnings do
Sandbox::Application.load_tasks
if Rails.version.to_f < 8.0
module ViewComponent
class RakeTasksTest < TestCase
def setup
Kernel.silence_warnings do
Sandbox::Application.load_tasks
end
end
end

def test_statsetup_task
Rake::Task["view_component:statsetup"].invoke
assert_includes ::STATS_DIRECTORIES, ["ViewComponents", "app/components"]
def test_statsetup_task
Rake::Task["view_component:statsetup"].invoke
assert_includes ::STATS_DIRECTORIES, ["ViewComponents", "app/components"]
end
end
end
end

0 comments on commit e12d2a6

Please sign in to comment.