<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -18,6 +18,12 @@ Screw.Unit(function() {
                 expect(obj.pizza()).to(equal, ret);
             });
 
+            it(&quot;stubs next to stubs&quot;, function() {
+                Screw.Stub.stub(obj, &quot;pizza&quot;).andReturn(&quot;cheese&quot;);
+                Screw.Stub.stub(obj, &quot;soda&quot;).andReturn(&quot;coke&quot;);
+                expect(obj.pizza()).to(equal, &quot;cheese&quot;);
+            });
+
             it(&quot;stubs over stubs&quot;, function() {
                 Screw.Stub.stub(obj, &quot;pizza&quot;).andReturn(&quot;cheese&quot;);
                 Screw.Stub.stub(obj, &quot;pizza&quot;).andReturn(&quot;sausage&quot;);
@@ -37,6 +43,50 @@ Screw.Unit(function() {
                 Screw.Stub.reset();
                 expect(obj.pizza()).to(equal, expected);
             });
+
+            describe(&quot;with a stub implementation&quot;, function() {
+                it(&quot;calls the stub implementation&quot;, function() {
+                    var called = false;
+                    Screw.Stub.stub(obj, &quot;pizza&quot;).as(function() {
+                        called = true;
+                    });
+                    obj.pizza();
+                    expect(called).to(be_true);
+                });
+
+                it(&quot;returns the return value of the stub implementation&quot;, function() {
+                    Screw.Stub.stub(obj, &quot;pizza&quot;).as(function() {
+                        return &quot;cheese&quot;;
+                    });
+                    expect(obj.pizza()).to(equal, &quot;cheese&quot;);
+                });
+
+                it(&quot;passes arguments to the stub implementation&quot;, function() {
+                    var args;
+                    Screw.Stub.stub(obj, &quot;pizza&quot;).as(function() {
+                        args = arguments;
+                    });
+                    obj.pizza(&quot;really&quot;, &quot;really&quot;, &quot;tasty&quot;);
+                    expect(args).to(equal, [&quot;really&quot;, &quot;really&quot;, &quot;tasty&quot;]);
+                });
+
+                it(&quot;calls the stub implementation with the correct receiver&quot;, function() {
+                    var receiver;
+                    Screw.Stub.stub(obj, &quot;pizza&quot;).as(function() {
+                        receiver = this;
+                    });
+                    obj.pizza();
+                    expect(receiver).to(equal, obj);
+                });
+
+                it(&quot;works on constructors&quot;, function() {
+                    Screw.Stub.stub(window, &quot;Pizza&quot;).as(function(topping) {
+                        this.topping = topping;
+                    });
+                    
+                    expect(new Pizza(&quot;pepperoni&quot;).topping).to(equal, &quot;pepperoni&quot;);
+                });
+            });
         });
 
         describe(&quot;.shouldReceive&quot;, function() {</diff>
      <filename>spec/stub_spec.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2d9d64e21d4d87d0ff0db622b9e82b129bd0fe87</id>
    </parent>
    <parent>
      <id>75055453794a1861215883c99ffb592b1dd5aed7</id>
    </parent>
  </parents>
  <author>
    <name>Mat Schaffer</name>
    <email>mat.schaffer@gmail.com</email>
  </author>
  <url>http://github.com/trotter/screw-unit/commit/1790f5acbbc2f1a2825af68480284a07285f1360</url>
  <id>1790f5acbbc2f1a2825af68480284a07285f1360</id>
  <committed-date>2009-06-30T19:37:05-07:00</committed-date>
  <authored-date>2009-06-30T19:37:05-07:00</authored-date>
  <message>Merge branch 'Peeja/master'</message>
  <tree>8e2460bea6f35e440ff54298e512352d304063fe</tree>
  <committer>
    <name>Mat Schaffer</name>
    <email>mat.schaffer@gmail.com</email>
  </committer>
</commit>
