Skip to content

Commit

Permalink
Update kit.test.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldrapper committed Nov 26, 2024
1 parent 9365d1b commit 9139919
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions quickdraw/kit.test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ def view_template
end
end

# This feature is only supported in Ruby 3.2 or later.
if Phlex::SUPPORTS_FIBER_STORAGE
# this test is flaky
test "raises when you try to render a component outside of a rendering context" do
expect { Components::SayHi("Joel") }.to_raise(RuntimeError) do |error|
expect(error.message) == "You can't call `SayHi' outside of a Phlex rendering context."
end
test "raises when you try to render a component outside of a rendering context" do
expect { Components::SayHi("Joel") }.to_raise(RuntimeError) do |error|
expect(error.message) == "You can't call `SayHi' outside of a Phlex rendering context."
end
end

test "defines methods for its components" do
expect(Example.new.call) == %(<article><h1>Hi Joel</h1><h1>Hi Joel</h1>Inside</article><article><h1>Hi Will</h1>Inside</article>)
end
test "defines methods for its components" do
expect(Example.new.call) == %(<article><h1>Hi Joel</h1><h1>Hi Joel</h1>Inside</article><article><h1>Hi Will</h1>Inside</article>)
end

0 comments on commit 9139919

Please sign in to comment.