Skip to content

Commit

Permalink
Update legacy_template_method.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Jan 30, 2024
1 parent 6716722 commit 37580a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/phlex/view/legacy_template_method.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
it "warns when you define a template" do
expect(Kernel).to receive(:warn)

class Example < Phlex::HTML
example = Class.new(Phlex::HTML) do
def template
h1 { "Hello, world!" }
end
end

expect(
Example.new.call
example.new.call
).to be == "<h1>Hello, world!</h1>"
end
end

0 comments on commit 37580a8

Please sign in to comment.