Skip to content

Commit

Permalink
make Zeitwerk happy
Browse files Browse the repository at this point in the history
  • Loading branch information
trinitytakei committed Dec 18, 2024
1 parent 692a4d6 commit 1585ef6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions app/services/app_generation/orchestrator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def call
AppGenerationJob.perform_later(@generated_app.id)

true
rescue AppGeneration::InvalidStateError
rescue AppGeneration::Errors::InvalidStateError
raise
rescue StandardError => e
@logger.error("Failed to start app generation", { error: e.message })
Expand All @@ -22,7 +22,9 @@ def call
private

def validate_initial_state!
raise AppGeneration::InvalidStateError, "App must be in pending state to start generation" unless @generated_app.pending?
return if @generated_app.pending?

raise AppGeneration::Errors::InvalidStateError, "App must be in pending state to start generation"
end
end
end
2 changes: 1 addition & 1 deletion test/services/app_generation/orchestrator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class OrchestratorTest < ActiveSupport::TestCase
assert_equal "generating", @generated_app.status
assert_not @generated_app.pending?

error = assert_raises(AppGeneration::InvalidStateError) do
error = assert_raises(AppGeneration::Errors::InvalidStateError) do
@orchestrator.call
end

Expand Down

0 comments on commit 1585ef6

Please sign in to comment.