<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MockMe: A new JavaScript mocking framework</title>
	<atom:link href="http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Sat, 20 Mar 2010 13:30:04 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: zdennis</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-268214</link>
		<dc:creator>zdennis</dc:creator>
		<pubDate>Thu, 16 Oct 2008 23:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-268214</guid>
		<description>Spies and mock expectations do couple you to how input / output collaborators are intended to be in use by a particular object. However, only doing &quot;after the fact&quot; state based verification requires that you have a test environment setup with all of the necessary object dependencies in place, and their dependencies in place. This is also coupling your test to implementation. Testing an object in isolation makes the object implementation clean as well as the the test. 

Often times when you only do pure black-box testing the tests themselves can be difficult to understand and change because there is so much going on just to set up the testing environment. 

Mocks are also a great design tool to discover interfaces you want to work with before it may exist. I think it&#039;s more than a matter of taste. I think it&#039;s understanding the value provided by which technique in a given situation, and choosing the appropriate one.</description>
		<content:encoded><![CDATA[<p>Spies and mock expectations do couple you to how input / output collaborators are intended to be in use by a particular object. However, only doing &#8220;after the fact&#8221; state based verification requires that you have a test environment setup with all of the necessary object dependencies in place, and their dependencies in place. This is also coupling your test to implementation. Testing an object in isolation makes the object implementation clean as well as the the test. </p>
<p>Often times when you only do pure black-box testing the tests themselves can be difficult to understand and change because there is so much going on just to set up the testing environment. </p>
<p>Mocks are also a great design tool to discover interfaces you want to work with before it may exist. I think it&#8217;s more than a matter of taste. I think it&#8217;s understanding the value provided by which technique in a given situation, and choosing the appropriate one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jlink</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-266685</link>
		<dc:creator>jlink</dc:creator>
		<pubDate>Thu, 14 Aug 2008 19:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-266685</guid>
		<description>@ChrisInCambo:
IMO both spying and setting up mock expectations couples you to the implementation to some degree since collaboration (asking other objects to fullfill tasks for me can be considered an implementation detail). The trick is to do that only as much as needed.
That said, spying looks like less coupling to me (compared to mock expectations) because by default you only specify what you absolutely want to happen, whereas most mocking frameworks expect you to specify all calls by default. 
Probably it&#039;s a matter of taste. I changed from one style (expectations) to the other (after the fact verifications) after 7 years. It just feels more natural...</description>
		<content:encoded><![CDATA[<p>@ChrisInCambo:<br />
IMO both spying and setting up mock expectations couples you to the implementation to some degree since collaboration (asking other objects to fullfill tasks for me can be considered an implementation detail). The trick is to do that only as much as needed.<br />
That said, spying looks like less coupling to me (compared to mock expectations) because by default you only specify what you absolutely want to happen, whereas most mocking frameworks expect you to specify all calls by default.<br />
Probably it&#8217;s a matter of taste. I changed from one style (expectations) to the other (after the fact verifications) after 7 years. It just feels more natural&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ChrisInCambo</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-266613</link>
		<dc:creator>ChrisInCambo</dc:creator>
		<pubDate>Wed, 13 Aug 2008 03:14:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-266613</guid>
		<description>The spying technique is something I&#039;ve read about but never used, but now we have framework so I can&#039;t wait to give it a try next time I start a project.

@jlink: At first glance would I be wrong in saying that spying puts more emphasis on verification of what occurred during the life cycle of the spy rather than simply implementing an interface? 
For me overuse of post use mock verification is in itself  a testing smell as it is a way of verifying the indirect outputs of the system under test and therefore requires a knowledge of the internal workings of the class which depends on the mock/stub and moves us further away from &#039;black box&#039; testing.</description>
		<content:encoded><![CDATA[<p>The spying technique is something I&#8217;ve read about but never used, but now we have framework so I can&#8217;t wait to give it a try next time I start a project.</p>
<p>@jlink: At first glance would I be wrong in saying that spying puts more emphasis on verification of what occurred during the life cycle of the spy rather than simply implementing an interface?<br />
For me overuse of post use mock verification is in itself  a testing smell as it is a way of verifying the indirect outputs of the system under test and therefore requires a knowledge of the internal workings of the class which depends on the mock/stub and moves us further away from &#8216;black box&#8217; testing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jlink</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-266609</link>
		<dc:creator>jlink</dc:creator>
		<pubDate>Tue, 12 Aug 2008 19:56:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-266609</guid>
		<description>The biggest difference between Amok &amp; Smoke on one side and MockMe on the other is that MockMe is a *spy* and not a *mock* framework. This leads to a different style of testing since - most of the time - you can be less specific in your tests with regards to your expected behaviour; this means that your tests will fail less often during refactoring.
Apart from that all three seem similar fit for doing their job.</description>
		<content:encoded><![CDATA[<p>The biggest difference between Amok &amp; Smoke on one side and MockMe on the other is that MockMe is a *spy* and not a *mock* framework. This leads to a different style of testing since &#8211; most of the time &#8211; you can be less specific in your tests with regards to your expected behaviour; this means that your tests will fail less often during refactoring.<br />
Apart from that all three seem similar fit for doing their job.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ChrisInCambo</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-266595</link>
		<dc:creator>ChrisInCambo</dc:creator>
		<pubDate>Tue, 12 Aug 2008 08:39:41 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-266595</guid>
		<description>You&#039;re not the only one holts, I think this is an area where the JavaScript community often falls well short of the mark. I&#039;ve been trying to get some dialog on the subject going over at the &lt;a href=&quot;http://groups.google.com/group/altdotjs/browse_thread/thread/832b3f7116856ead&quot; title=&quot;AltDotJS&quot; rel=&quot;nofollow&quot;&gt;AltDotJS Google Group&lt;/a&gt;. We&#039;re trying to put together a place where developers can discuss TDD/BDD, design patterns, agile, DSL&#039;s all within the context of JavaScript. So anyone who is interested in these subjects and others which don&#039;t get much air time at present please join the group and contribute.

It seems like there&#039;s a run of testing tools being released for JavaScript at the moment. If you follow the link above there are details about two new JavaScript mocking frameworks (Amok and Smoke) and one new BDD testing framework (Screw Unit).</description>
		<content:encoded><![CDATA[<p>You&#8217;re not the only one holts, I think this is an area where the JavaScript community often falls well short of the mark. I&#8217;ve been trying to get some dialog on the subject going over at the <a href="http://groups.google.com/group/altdotjs/browse_thread/thread/832b3f7116856ead" title="AltDotJS" rel="nofollow">AltDotJS Google Group</a>. We&#8217;re trying to put together a place where developers can discuss TDD/BDD, design patterns, agile, DSL&#8217;s all within the context of JavaScript. So anyone who is interested in these subjects and others which don&#8217;t get much air time at present please join the group and contribute.</p>
<p>It seems like there&#8217;s a run of testing tools being released for JavaScript at the moment. If you follow the link above there are details about two new JavaScript mocking frameworks (Amok and Smoke) and one new BDD testing framework (Screw Unit).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jmneter</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-266592</link>
		<dc:creator>jmneter</dc:creator>
		<pubDate>Tue, 12 Aug 2008 07:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-266592</guid>
		<description>This looks better,just like &lt;a href=&quot;http://www.voicent.com/ivr.php?a=8223&quot; rel=&quot;nofollow&quot;&gt;IVR&lt;/a&gt; I use frequently.</description>
		<content:encoded><![CDATA[<p>This looks better,just like <a href="http://www.voicent.com/ivr.php?a=8223" rel="nofollow">IVR</a> I use frequently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: holts</title>
		<link>http://ajaxian.com/archives/mockme-a-new-javascript-mocking-framework/comment-page-1#comment-266586</link>
		<dc:creator>holts</dc:creator>
		<pubDate>Mon, 11 Aug 2008 18:31:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=4063#comment-266586</guid>
		<description>I dig this.  Looks cool.

I really wish there were more books on testing with JavaScript, Ruby, and Python.  There are many great tools, take Ruby for example... Flexmock, Mocha, Rspec, etc... would love to see a book that really delved deep into best strategies and techniques for using them.  Same goes for JS, which seems to be behind the curve with TDD practices.</description>
		<content:encoded><![CDATA[<p>I dig this.  Looks cool.</p>
<p>I really wish there were more books on testing with JavaScript, Ruby, and Python.  There are many great tools, take Ruby for example&#8230; Flexmock, Mocha, Rspec, etc&#8230; would love to see a book that really delved deep into best strategies and techniques for using them.  Same goes for JS, which seems to be behind the curve with TDD practices.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
