Skip to content

Commit

Permalink
CI fails with missing ECR, so just adding a require just in case (#1871)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoertink authored Apr 20, 2024
1 parent b72da95 commit 2b48435
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/tasks/gen/action_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,15 @@ describe Gen::Action do
io.to_s.should contain("That's not a valid Action.")
end
end

it "generates the correct template" do
template = Lucky::ActionTemplate.new(
name: "User::Index",
action: "index",
inherit_from: "BrowserAction",
route: %(get "/users")
)
folder = template.template_folder
LuckyTemplate.snapshot(folder).has_key?("src/actions/user/index.cr").should eq(true)
end
end
1 change: 1 addition & 0 deletions tasks/gen/action/action_generator.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "ecr"
require "colorize"
require "lucky_template"
require "../../../src/lucky/route_inferrer"
Expand Down
1 change: 1 addition & 0 deletions tasks/gen/component.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "ecr"
require "lucky_task"
require "lucky_template"
require "colorize"
Expand Down
1 change: 1 addition & 0 deletions tasks/gen/page.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "ecr"
require "lucky_task"
require "lucky_template"
require "colorize"
Expand Down
1 change: 1 addition & 0 deletions tasks/gen/task.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require "ecr"
require "lucky_task"
require "lucky_template"
require "colorize"
Expand Down

0 comments on commit 2b48435

Please sign in to comment.