Listing 2. clickview.html

<html>
<head>
<script src="lib/jquery-1.2.6.js"></script>
<script src="lib/jquery.fn.js"></script>
<script src="lib/jquery.print.js"></script>
<script src="lib/screw.builder.js"></script>
<script src="lib/screw.matchers.js"></script>
<script src="lib/screw.events.js"></script>
<script src="lib/screw.behaviors.js"></script>
<link rel="stylesheet" href="lib/screw.css">

<!-- Here is the function we define, to test -->
<script type="text/javascript">
       function hide_paragraph() {
               $("#hideme").hide();
       }

       $(document).ready(function() {
           $('#hideme').click(function() {
               hide_paragraph();
           });
       });
</script>

<!-- Here is the test itself -->
<script type="text/javascript">
     Screw.Unit(function() {

       describe("Paragraph", function() {

         it("should be hidden when clicked", function() {
           hide_paragraph();
           expect($('#hideme').is(':hidden')).to(equal, true);

         });
       });
     });
</script>

</head>
<body>
<p id="hideme">Click to hide</p>
</body>
</html>

