2008/2/18, itsme213 &lt;<a href="mailto:itsme213@hotmail.com">itsme213@hotmail.com</a>&gt;:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&quot;Denis Kudriashov&quot; &lt;<a href="mailto:dionisiydk@gmail.com">dionisiydk@gmail.com</a>&gt; wrote in message<br><br>&gt;I released new version of mock objects framework named Mocketry.<br><br>This looks really nice! Can you give some pointers on where to read a bit<br>
more about the various kinds of specs provided (state, context, usage, ...),</blockquote><div><br>I want create site about Mocketry in the next month.<br>Now there is only &quot;<a href="http://www.squeaksource.com/Mocketry">http://www.squeaksource.com/Mocketry</a>&quot; wiki.<br>
And you can browse Mocketry acceptance tests - subclasses of BehaviorSpecAcceptanceTestCase and SpecDSLAcceptanceTests.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
and how the &lt;pragmas&gt; are used? (I will browse the code too :-)</blockquote><div><br>&nbsp;Spec DSL clauses is expressions like:<br><div style="margin-left: 40px;">- 3 should be a kind of: SmallInteger<br>- Kind of: SmallInteger<br>
</div>First is used for immediately check variable for satisfying concrete spec (HierarchySpec here)<br>Second is used in argument constraints (for example). It will check argument for satisfying same spec (HierarchySpec).<br>
Thus both expressions use HierarchySpec that actually know how tests object for classes relationship.<br>Kind class is just DSL keyword.<br>Kind class&gt;&gt;of: returns instance of concrete spec and describes &quot;should expression&quot; for it by pragma:<br>
<br><div style="margin-left: 40px;">Kind class&gt;&gt;of: aClass <br>&nbsp;&nbsp;&nbsp; &lt;syntax: #(be a kind of:)&gt;<br>&nbsp;&nbsp;&nbsp; ^HierarchySpec for: aClass<br></div></div><br>Method can include many &quot;syntax&quot; pragmas (&quot;syntax pathes&quot;).<br>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Any pre-requisites? Use standard test runner?</blockquote><div><br></div></div>Only pre-requisite is SMock package for Mocketry tests. Maybe Mocketry should have two different packages: for tests and for base code. Then base code doesn&#39;t need any pre-requisites.<br>
<br>About test runner:<br><br>With Mocketry use can use any Testing framework and TestRunner that you want. <br>You doesn&#39;t need create special Base TestCase class that provide mock objects facilities. <br>If you need mock object just get it from scenario block argument or testcase inst var (empty or initialized in setUp method (for example) by &quot;instVar := MockObject new&quot;). <br>
In test methods you don&#39;t worry about what is mock objects, you just write specification of objects interaction and test it.<br>Scenario system transparently creates and controls mock objects by method context.<br>