Skip to content

Commit

Permalink
Add a Shoes-Spec example based on the intended API
Browse files Browse the repository at this point in the history
  • Loading branch information
noahgibbs committed Jul 3, 2024
1 parent dd5db61 commit 9904d9a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions html/sspec_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script type="module" src="https://cdn.jsdelivr.net/npm/@spaceshoes/spacewalk/spacewalk.js"></script>
<script type="text/ruby">
Shoes.app do
@b = button "OK" do
@b.text = "Clicked"
end
end
</script>

<script type="text/shoes-spec">
assert_equal "OK", button().text
button().trigger_click
assert_equal "Clicked", button().text
</script>
</head>

<body>
</body>
</html>

0 comments on commit 9904d9a

Please sign in to comment.