File: file.RELEASE.html

package info (click to toggle)
ruby-mocha 0.11.3-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 2,300 kB
  • sloc: ruby: 9,935; makefile: 2
file content (954 lines) | stat: -rw-r--r-- 44,106 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
  File: RELEASE
  
    &mdash; Mocha 0.11.3
  
</title>

  <link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />

  <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>

  <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>

  <script type="text/javascript" charset="utf-8" src="js/app.js"></script>


  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html" title="Index">Index</a> &raquo; 
    <span class="title">File: RELEASE</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  
    <a id="class_list_link" href="#">Class List</a>
  
    <a id="method_list_link" href="#">Method List</a>
  
    <a id="file_list_link" href="#">File List</a>
  
</div>
      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><div id='filecontents'>
<h1>0.11.3</h1>
<ul><li>
<p>Fix for #78 i.e. alias Object#method as Object#_method, not
Object#__method__ which already exists as another Ruby method.</p>
</li></ul>

<h1>0.11.2</h1>
<ul><li>
<p>Rails has a Request class which defines its own #method method. This broke
the new mechanism for stubbing a method. This release includes a slightly
modified version of fix #77 provided by @sikachu. See <a
href="https://github.com/rails/rails/pull/5907">github.com/rails/rails/pull/5907</a>
for further info.</p>
</li></ul>

<h1>0.11.1</h1>
<ul><li>
<p>In Ruby 1.8.7 methods accepting a block parameter were incorrectly restored
without the block parameter after being stubbed. Fix for #76.</p>
</li></ul>

<h1>0.11.0 (this version was yanked from rubygems.org)</h1>
<ul><li>
<p>Store original method when stubbing rather than using alias_method. This
fixes #41, #47, #74 and all tests now pass on both Ruby 1.8.7 and 1.9.3.</p>
</li><li>
<p>Attempting to stub a method on a frozen object should fail fast. See #68.</p>
</li><li>
<p>Prevent stubbing a method on nil by default. See #68.</p>
</li><li>
<p>Generate documentation using YARD instead of Rdoc - removes dependency on
Coderay.</p>
</li><li>
<p>Publish documentation on Github pages instead of Rubyforge - uses rake task
written by @tomafro.</p>
</li><li>
<p>Remove agiledox which has outlived it’s usefulness.</p>
</li><li>
<p>Removed trailing whitespace throughout codebase.</p>
</li><li>
<p>Add documentation for Mock#unstub.</p>
</li><li>
<p>Improve documentation for ObjectMethods.</p>
</li><li>
<p>Provide a way to run multiple tests within a single acceptance test method.</p>
</li></ul>

<h1>0.10.5</h1>
<ul><li>
<p>Fix for issue #66 (hopefully without regressing on issue #63) - Mocha::Mock
has Mocha::Mockery as a dependency. Stop trying to pretend otherwise.
Thanks to @kennyj for reporting.</p>
</li><li>
<p>Fix a bunch of warnings in Ruby 1.9. There are still the 6 test failures
mentioned in issue #41 which I suspect are due to the introspection gem not
being Ruby 1.9-compatible.</p>
</li><li>
<p>Add links to README for source code &amp; issue tracker.</p>
</li><li>
<p>Fix for issue #67 - Make the travis-ci badge visible in the README. Thanks
to Diego Plentz for pull request.</p>
</li><li>
<p>Fix for issue #70 - Rename Mock#expectations to Mock#__expectations__ to
avoid conflicts. Thanks to Jeremy Stephens for pull request.</p>
</li></ul>

<h1>0.10.4</h1>
<ul><li>
<p>Fix for issue #65 - expectations not being verified in subsequent tests.</p>
</li><li>
<p>Fix for issue #63 - require Mocha::Mockery at Mocha::Mock class load time
and not on invocation of Mock#method_missing.</p>
</li><li>
<p>Fix for issue #45 - raise ArgumentError if
Mocha::ParameterMatchers#has_entry is given</p>
</li></ul>

<p>Hash with wrong number of entries.</p>
<ul><li>
<p>Make global variable name more obscure to avoid clashes with other
libraries.</p>
</li><li>
<p>Move travis-ci-related gemfiles into their own directory.</p>
</li></ul>

<h1>0.10.3</h1>
<ul><li>
<p>Fix for issue #57. Gem::Requirement#=~ was only added in rubygems v1.8.0,
but Object#=~ means the result of various monkey-patching checks is always
false/nil for earlier versions of rubygems. However, the method it aliases
#satisfied_by? has existed since Gem::Dependency was extracted from
Gem::Version in rubygems v0.9.4.4, so it’s much safer to use that. Thanks
to fguillen for reporting and helping with diagnosis.</p>
</li></ul>

<h1>0.10.2</h1>
<ul><li>
<p>Merge pull request #53. Unstubbing a method should not remove expectations
for other stubbed methods. Fixes #52. Thanks to saikat.</p>
</li></ul>

<h1>0.10.1</h1>
<ul><li>
<p>Merge pull request #51. Use Gem::Requirement &amp; Gem::Version for version
comparison. Fixes issue #50. Thanks to meineerde.</p>
</li><li>
<p>Fixed typo in rdoc for Mocha::ObjectMethods.</p>
</li><li>
<p>Improve README as suggested in issue #46. Explain that Mocha must be loaded
after test libraries and how to achieve this using Bundler.</p>
</li><li>
<p>Merge pull request #43 - nobody expects the spanish inquisition! Thanks to
cairo140.</p>
</li><li>
<p>Fix for issue #39 - improve documentation for Expectation#multiple_yields.</p>
</li><li>
<p>Fix for issue #38 where a subtle change in test-unit v2.3.0 had been missed
- only visible in verbose mode.</p>
</li><li>
<p>Support for MiniTest up to v2.6.2 has been verified.</p>
</li><li>
<p>Add explicit development dependency on coderay for generating
syntax-highlighted code examples.</p>
</li></ul>

<h1>0.10.0</h1>
<ul><li>
<p>Add Expectation#throws to allow a stubbed method to use Kernel#throw.</p>
</li><li>
<p>Updates for versions of Test::Unit up to and including v2.3.3 (including
patch by Jens Fahnenbruck).</p>
</li><li>
<p>Updates for versions of MiniTest up to and including v2.5.1.</p>
</li><li>
<p>Since the singleton method added by Mocha masks the underlying instance
method, there’s no need to move it out the way and then back again. This
fixes Github issue #20, because the original method is left unchanged - <a
href="https://github.com/floehopper/mocha/issues/20">github.com/floehopper/mocha/issues/20</a>
(thanks to Nick Lewis).</p>
</li><li>
<p>Handle stubbing of a singleton method, leaving the original method
unchanged after the test.</p>
</li><li>
<p>When stubbing an instance method that was originally defined as a singleton
method, the original method should still exist after the test.</p>
</li><li>
<p>Fixed mis-print in Mocha::ObjectMethods#unstub documentation (patch by Gleb
Pomykalov).</p>
</li><li>
<p>Improved test coverage around stubbing of methods defined in different ways
- this makes use of the newly extracted introspection gem (although this
means some tests are now failing in Ruby v1.9.2).</p>
</li><li>
<p>Added configuration for Travis continuous integration.</p>
</li><li>
<p>Make the gemspec the canonical reference and stop generating it from the
Rakefile.</p>
</li><li>
<p>Use the built-in Bundler rake tasks for packaging the gem.</p>
</li><li>
<p>Use the “release” rake task provided by Bundler instead of using the
Rake::XForge::Release functionality.</p>
</li><li>
<p>Extract Object#__metaclass__ into a new metaclass gem.</p>
</li><li>
<p>Run rake tasks without `bundle exec`.</p>
</li><li>
<p>Avoid deprecation warning for rdoc rake task.</p>
</li><li>
<p>Remove the `use_test_unit_gem` MOCHA_OPTION which hasn’t worked since we
switched to bundler - we can now run the tests specifying a different
Gemfile instead.</p>
</li><li>
<p>Use multiple Gemfiles seems to run Travis CI builds against multiple
version of test-unit &amp; minitest.</p>
</li></ul>

<h1>0.9.12</h1>
<ul><li>
<p>Make Mocha’s tests pass under Ruby 1.9.2 i.e. using MiniTest. One of the
main issues was that we were not parsing stacktraces on MiniTest errors
comprehensively enough.</p>
</li><li>
<p>Avoid ‘circular require considered harmful’ warning when running Mocha’s
tests in Ruby 1.9.2</p>
</li><li>
<p>Make performance tests work on Ruby 1.9.2 i.e. using MiniTest.</p>
</li><li>
<p>Declare rake as a <b>development</b> dependency with newer versions of
Rubygems since it’s only needed to carry out developer-related tasks.</p>
</li></ul>

<h1>0.9.11</h1>
<ul><li>
<p>Added explicit support for minitest v1.5.0 to v2.0.2.</p>
</li><li>
<p>Make testable by rubygems-test.</p>
</li><li>
<p>Update links to my blog and make other links consistent.</p>
</li><li>
<p>Added a URI parameter matcher that ignores the order of query parameters so
that tests can be independent of undefined hash ordering (patch by Paul
Battley).</p>
</li><li>
<p>Include unexpected invocation in failure message and change the language
slightly to make the failure message less confusing. See <a
href="http://floehopper.lighthouseapp.com/projects/22289/tickets/52">floehopper.lighthouseapp.com/projects/22289/tickets/52</a>.</p>
</li><li>
<p>No need to create regular expression every time the
BacktraceFilter#filtered method is called. See <a
href="http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/66">floehopper.lighthouseapp.com/projects/22289-mocha/tickets/66</a>.</p>
</li></ul>

<h1>0.9.10</h1>
<ul><li>
<p>Added Mocha::ObjectMethods#unstub method - <a
href="https://github.com/floehopper/mocha/issues#issue/6">github.com/floehopper/mocha/issues#issue/6</a></p>
</li><li>
<p>Inherit Mocha::ExpectationError from Exception instead of StandardError to
reduce the chances of a test passing by accident - thanks to James Sanders
(jsanders) - <a
href="https://github.com/floehopper/mocha/issues#issue/15">github.com/floehopper/mocha/issues#issue/15</a></p>
</li><li>
<p>Fixed bug - GitHub README page to link correctly to code examples - <a
href="https://github.com/floehopper/mocha/issues/closed#issue/11">github.com/floehopper/mocha/issues/closed#issue/11</a></p>
</li><li>
<p>Fixed bug - PASSTHROUGH_EXCEPTIONS are defined on MiniTest::Unit::TestCase
not in Mocha - thanks to Brian Troutwine (blt) - <a
href="https://github.com/floehopper/mocha/issues/closed#issue/14">github.com/floehopper/mocha/issues/closed#issue/14</a></p>
</li></ul>

<h1>0.9.9</h1>
<ul><li>
<p>Avoid loading bits of the test-unit gem by accident. This is an attempt at
a fix for the problem that James Adam reported [1]. By using ‘load’ instead
of ‘require’ to detect the version of Test::Unit, we can avoid rubygems
trying to load bits of the test-unit gem when it’s not wanted. [1] <a
href="http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/50#ticket-50-13">floehopper.lighthouseapp.com/projects/22289-mocha/tickets/50#ticket-50-13</a></p>
</li><li>
<p>Fix exception when running rake without test-unit gem. When test-unit gem
&gt;=v2.0.0 was installed but the “use_test_unit_gem” MOCHA_OPTIONS was not
specified, a “comparison of Fixnum with Hash failed” exception was being
raised when running the performance tests. This was because bits of the
test-unit gem were being loaded accidentally and a Hash was being
incorrectly supplied to the TestRunner.run method.</p>
</li><li>
<p>Explicitly require rubygems for running tests via rake using test-unit gem.</p>
</li><li>
<p>Handle newer versions of test-unit gem (v2.0.2 to v2.0.9)</p>
</li><li>
<p>Handle newer versions of minitest gem (v1.4.0 to v1.6.0)</p>
</li><li>
<p>Added warnings about monkey-patching test-unit and minitest to aid
debugging. These are enabled by including “debug” in the MOCHA_OPTIONS
environment variable. This is now a comma-separated list, so that we can
specify multiple options e.g. MOCHA_OPTIONS=debug,use_test_unit_gem</p>
</li><li>
<p>Eloy Duran (alloy) made the unit tests run on 1.9.2dev r25249.</p>
</li><li>
<p>Eloy Duran (alloy) also improved some MiniTest TestResult code I’d written
and got the acceptance tests running on Ruby 1.9 HEAD. There are still 4
failures because for some reason the backtrace line numbers are off by one.
And the minitest_test test case does not run when the whole suite is run
with MiniTest. These issues still need investigation.</p>
</li><li>
<p>Fixed some acceptance tests to run in Ruby 1.9.2 - it’s no longer possible
to subvert the protection of a method by calling it via Object#send.</p>
</li><li>
<p>Fixed “test:performance” rake task so it runs in Ruby 1.9.2.</p>
</li><li>
<p>Fix test incorrectly failing under Rubinius 1.0. This test imposed too many
constraints. It appears that Object#inspect legitimately calls
Object#object_id in Rubinius. But we’re only interested in what ‘id’
methods Mocha::ObjectMethods#mocha_inspect calls. By stubbing
Object#inspect we can relax the constraints imposed by the test.</p>
</li><li>
<p>Luke Redpath (lukeredpath) added new shorthand “any” and “all” composite
parameter matchers using “&amp;” and “|”. This provides an alternative
syntax for expecting any or all matchers to pass, e.g.
foo.expects(:bar).with(equals(1) | equals(2)).</p>
</li><li>
<p>Improved documentation for Expectation#raises. A number of people have
suggested an extension to the API to cope with custom exceptions that have
extra constructor parameters. However, since the arguments supplied to
Expectation#raises are just passed on to Kernel#raise, it’s possible to
pass in an instance of an exception. Thus no change to the API is required,
but it does seem worthwhile pointing this out in the docs.</p>
</li><li>
<p>Corrected RDoc example for Expectation#never thanks to Red David
(reddavis).</p>
</li><li>
<p>Improved RDoc including a change suggested by Rohit Arondekar (rohit).</p>
</li><li>
<p>Updated gemspec as requested by Sam Woodard (shwoodard).</p>
</li></ul>

<h1>0.9.8</h1>
<ul><li>
<p>Fixed bug “NameError raised when using Mocha as a Rails plug-in” - <a
href="http://floehopper.lighthouseapp.com/projects/22289/tickets/53">floehopper.lighthouseapp.com/projects/22289/tickets/53</a>.
Since 0.9.6 the Rails plugin has been broken. See bug report for details.
You will need to explicitly load Mocha <b>after</b> the test framework has
been loaded, e.g. by adding “require ‘mocha’” at the bottom of
test/test_helper.rb.</p>
</li><li>
<p>Make Mocha::ParameterMatchers#regexp_matches, #includes, #has_value,
#has_key more robust. Thanks to Sander Hartlage.</p>
</li><li>
<p>Allow passing a block to Mocha::Configuration methods to only change
configuration for the duration of the block. Thanks to Dan Manges.</p>
</li><li>
<p>Fixed bug “doc generation fails in 0.9.7 gem” - <a
href="http://floehopper.lighthouseapp.com/projects/22289/tickets/51">floehopper.lighthouseapp.com/projects/22289/tickets/51</a>.</p>
</li><li>
<p>Remove rdoc template incorporating google analytics from source control.
The file just needs to exist locally and be ignored by source control. This
should stop the warning showing up on e.g. RunCodeRun build results.</p>
</li></ul>

<h1>0.9.7</h1>
<ul><li>
<p>Although I had provided a deprecation warning for people using
Mocha::Standalone, I had assumed people wouldn’t be explicitly loading the
mocha/standalone.rb file. It turns out this assumption was incorrect at
least in the case of Rspec. This is now fixed.</p>
</li></ul>

<h1>0.9.6</h1>
<ul><li>
<p>Version 2.0.1 of the test-unit gem introduced a private ‘run_test’ method
on TestCase which clashed with the public TestRunner#run_test method. So
this latter method has been renamed to ‘run_as_test’.</p>
</li><li>
<p>Stop requiring rubygems - this should be an environmental choice for the
user. <a href="http://gist.github.com/54177">gist.github.com/54177</a> -
describes why requiring rubygems in your library code is a bad idea.</p>
</li><li>
<p>It seems like overkill to vendorize coderay and meta_project when they’re
only needed to generate the examples for documentation and for publishing
files on RubyForge. So I’m removing them and installing them locally as
gems when I need them.</p>
</li><li>
<p>Added support for ‘test-unit’ gem (version &gt;= 2.0). Note that as with
other versions of Test::Unit I’m completely replacing the TestCase#run
method. Unfortunately in version 2.0.0 this method differs slightly from
the same method in version 2.0.1 &amp; 2.0.2, so we have to provide
different implementations to ensure that the internal working of Test::Unit
are not compromised by Mocha. Note also that unless the ‘test-unit’ gem is
loaded, requiring ‘test/unit’ leads to a mixture of stdlib and gem classes
being loaded causing errors. To avoid a dependency on rubygems, the gem is
loaded only if MOCHA_OPTIONS is set to ‘use_test_unit_gem’ - this option is
only intended for use in running Mocha’s own tests. It might be worthwhile
to create a shim gem like minitest_tu_shim to allow the test-unit gem to
completely replace the stdlib, but that’s a job for another day. The
changes in the Rakefile are to make the default task run with the
‘test-unit’ gem (version &gt;= 2.0).</p>
</li><li>
<p>Renamed Mocha::Standalone to Mocha::API to better reflect its purpose.
Added a deprecation warning for those who are referencing
Mocha::Standalone.</p>
</li><li>
<p>Fix exception raised by HasEntry#matches? if first param is not a Hash
(thanks to Taylor Barstow).</p>
</li><li>
<p>Ken Collins reported [1] that Mocha is always loading MiniTest if it is
available and loading it causes some Rails/ActionPack tests to break. I’ve
removed the loading of MiniTest, but this now means the user has to ensure
that if they want to use MiniTest in conjunction with Mocha, he must load
MiniTest before loading Mocha. [1] <a
href="http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2060">rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/2060</a></p>
</li><li>
<p>Implemented Bacon integration (thanks to Ubiratan Pires Alberton), but this
was then removed after deciding only to maintain integration with
Test::Unit and MiniTest which are both Ruby standard libraries. See mailing
list for details.</p>
</li><li>
<p>Don’t monkey-patch MiniTest if it’s already been monkey-patched by Mocha.</p>
</li><li>
<p>Fixed bug: MiniTest integration was counting ExpectationErrors as errors
not failures. <a
href="http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/41">floehopper.lighthouseapp.com/projects/22289-mocha/tickets/41</a>.</p>
</li><li>
<p>Fixed bug: Some Bacon tests were failing in Ruby 1.9.1. <a
href="http://floehopper.lighthouseapp.com/projects/22289-mocha/tickets/43">floehopper.lighthouseapp.com/projects/22289-mocha/tickets/43</a>.</p>
</li><li>
<p>Chad Humphries pointed out that in Ruby 1.9.1, if you are not using
Test::Unit or MiniTest, Mocha will attempt to load and monkey-patch
Test::Unit. Mocha will now only monkey-patch Test::Unit and/or MiniTest if
they have already been loaded. MiniTest tests will now run in both Ruby
1.8.6 (with MiniTest gem) and in Ruby 1.9.1 (with MiniTest std lib). See
Ligthouse ticket - <a
href="http://floehopper.lighthouseapp.com/projects/22289/tickets/49">floehopper.lighthouseapp.com/projects/22289/tickets/49</a>.</p>
</li><li>
<p>Made Mocha compatible with minitest 1.4.0 and above (thanks to Denis
Defreyne).</p>
</li></ul>

<h1>0.9.5</h1>
<ul><li>
<p>Fixed Lighthouse bug #32 - stub_everything should mean mock responds to
anything.</p>
</li><li>
<p>Added Expectation#twice to improve readability. Thanks to pull request from
Celestino Gomes.</p>
</li><li>
<p>In Ruby 1.9.1, requiring ‘test/unit’ loads a thin wrapper around MiniTest
and Test::Unit::TestCase ends up inheriting from MiniTest::Unit::TestCase.
So we need to avoid including the Mocha modules more than once to avoid
nasty consequences. Thanks to Matthias Hennemeyer for help with this.</p>
</li><li>
<p>Ruby 1.9 includes rake, but not rake/contrib. For the moment I’ve moved the
sshpublisher require into the only rake task that needs it, so that I can
at least run the tests in Ruby 1.9. It looks like I will need to build a
rake/contrib gem or similar to get this working properly - <a
href="http://intertwingly.net/blog/2008/01/07/Rake-Contrib-for-1-9">intertwingly.net/blog/2008/01/07/Rake-Contrib-for-1-9</a></p>
</li></ul>

<h1>0.9.4</h1>
<ul><li>
<p>Added mocha.gemspec file generated with Chad Woolley’s new rake task, so
that a floehopper-mocha gem will get built on GitHub.</p>
</li><li>
<p>Add rake task to update mocha.gemspec with unique version, which will cause
gem to be auto-built on github</p>
</li><li>
<p>As Tobias Crawley correctly pointed out in feature request #23055
“stubs(with_hash) not working with existing object” [1], following the
principle of least surprise, it should be possible to call
ObjectMethods#expects &amp; ObjectMethods#stubs with a Hash of method_names
vs return_values like you can with Mock#expects &amp; Mock#stubs. I’ve also
updated &amp; improved the docs to reflect the changes. [1] <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=23055&group_id=1917&atid=7480">rubyforge.org/tracker/index.php?func=detail&aid=23055&group_id=1917&atid=7480</a></p>
</li><li>
<p>Removed deprecated gem autorequire.</p>
</li></ul>

<h1>0.9.3</h1>
<ul><li>
<p>Added support for MiniTest thanks to Jeff Smick.</p>
</li><li>
<p>Fixed a possible bug with some of the non-default Configuration options
relating to the argument to Object#respond_to?</p>
</li><li>
<p>As per Jay Fields recommendations [1] and with further impetus from a talk
at Ruby Manor, any methods added to core classes are now added by including
a module. This means that Mocha is a better citizen of the Ruby world and
it’s behaviour is more easily extended. [1] <a
href="http://blog.jayfields.com/2008/07/ruby-underuse-of-modules.html">blog.jayfields.com/2008/07/ruby-underuse-of-modules.html</a>
&amp; <a
href="http://blog.jayfields.com/2008/07/ruby-redefine-method-behavior.html">blog.jayfields.com/2008/07/ruby-redefine-method-behavior.html</a></p>
</li><li>
<p>Removed deprecated gem autorequire.</p>
</li></ul>

<h1>0.9.2</h1>
<ul><li>
<p>Improved documentation to address [#22530] ‘Mock methods with multiple
return values not possible?’</p>
</li><li>
<p>respond_with parameter matcher was not available in tests.</p>
</li><li>
<p>Patch [#22630] Fix for a bug in running Rails tests with Ruby 1.8.7.
Array#flatten was being called which in turn was checking whether each
element responded to #to_ary. This check was using the two parameter
version of #respond_to?, but Mock was only defining a one parameter
version.</p>
</li></ul>

<h1>0.9.1</h1>
<ul><li>
<p>Fixed bug #21465 - expects &amp; stubs should support method names as
strings (as well as symbols) or fail fast. Convert all expectation method
names to a symbol in case they were supplied as a string.</p>
</li><li>
<p>By removing Mock#unexpected_method_called we reduce the number of methods
vulnerable to the problem that surfaced in bug #21563.</p>
</li><li>
<p>Fix bug #21563 - stubbing ‘verified?’ method is unsafe. Instance method
names on the Mock class should be more obscure.</p>
</li><li>
<p>Performance improvement. StubbaExampleTest goes twice as fast on my local
machine.</p>
</li><li>
<p>Added primitive performance test to default rake task.</p>
</li><li>
<p>Fix format of case statements which don’t work in Ruby 1.9 and make others
consistent.</p>
</li><li>
<p>There is no point in running (potentially expensive) checks if
configuration is set to allow such checks to fail. This is a relatively
quick fix in response to Chris McGrath’s performance problems.</p>
</li><li>
<p>Fix for bug #21161 - ‘uninitialized constant Deprecation in stubba.rb’.</p>
</li><li>
<p>It’s more readable to talk about ‘once’ and ‘twice’ rather than ‘1 time’
and ‘2 times’.</p>
</li><li>
<p>Fix bug #20883 - never should raise when called to prevent follow up
errors. Fail fast when there are no matching invokable expectations and
handle the stub_everything case sensibly. This might not be entirely
backwards compatible, but I think the benefits outweigh the risks. The most
likely change is that a test that was already failing will now fail faster,
which doesn’t seem so awful.</p>
</li></ul>

<h1>0.9.0</h1>
<ul><li>
<p>Configurable warnings or errors</p>
<ul><li>
<p>when a method on a non-public method is stubbed</p>
</li><li>
<p>when a method on a non-existent method is stubbed</p>
</li><li>
<p>when a method on a non-mock object is stubbed</p>
</li><li>
<p>when a method is stubbed unnecessarily (i.e. the stubbed method is not
called during the test)</p>
</li></ul>
</li><li>
<p>Improved error messages</p>
<ul><li>
<p>User-friendly list of unsatisfied expectations, satisfied expectations and
state machines.</p>
</li><li>
<p>Improved readability of cardinality description.</p>
</li><li>
<p>Display sensible failure message for any_instance expectations e.g.
“#&lt;AnyInstance:Foo&gt;.bar - expected calls: 1, actual calls: 0”</p>
</li></ul>
</li><li>
<p>Parameter matchers</p>
<ul><li>
<p>New to this release</p>
<ul><li>
<p>optionally (allows matching of optional parameters if available)</p>
</li><li>
<p>yaml_equivalent (allows matching of YAML that represents the specified
object)</p>
</li><li>
<p>responds_with (tests the quack not the duck)</p>
</li></ul>
</li><li>
<p>Nesting of parameter matchers is now supported.</p>
</li></ul>
</li><li>
<p>Optional block passed into mock initializer is evaluated in the context of
the new mock instance and can be used as a shortcut to set up expectations.</p>
</li><li>
<p>Added JMock-style sequences for constraining the order of expected
invocations. See Standalone#sequence and Expectation#in_sequence.</p>
</li><li>
<p>Added JMock-style states for constraining the order of expected
invocations. See Standalone#states, Expectation#then, Expectation#when and
StateMachine.</p>
</li><li>
<p>Compatibility with versions of Ruby</p>
<ul><li>
<p>Compatibility with Ruby v1.9. All test errors and warnings fixed.</p>
</li><li>
<p>Nasty fix so that TestCaseAdaptor works consistently with earlier versions
of Test::Unit as well as more recent versions.</p>
</li><li>
<p>Added platform to gem specification to avoid bug in rubygems 0.9.5 - see <a
href="http://www.dcmanges.com/blog/rubygems-0-9-5-platform-bug">www.dcmanges.com/blog/rubygems-0-9-5-platform-bug</a>
and <a
href="http://rubygems.org/read/chapter/20#platform">rubygems.org/read/chapter/20#platform</a>.</p>
</li><li>
<p>Make ExpectationRaiser deal with subclasses of Interrupt which seem to need
a message supplied in the raise statement in Ruby 1.8.6 (but not 1.8.4 or
1.9). Not sure this is really Mocha’s responsibility.</p>
</li></ul>
</li><li>
<p>Added deprecation warning in stubba.rb which is no longer needed and will
be removed.</p>
</li><li>
<p>Supply positioning information to evals to improve any error messages. See
<a
href="http://ola-bini.blogspot.com/2008/01/ruby-antipattern-using-eval-without.html">ola-bini.blogspot.com/2008/01/ruby-antipattern-using-eval-without.html</a></p>
</li><li>
<p>Bug fixes</p>
<ul><li>
<p>18914 in revision 296 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=18914&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=18914&group_id=1917&atid=7477</a></p>
</li><li>
<p>18917 in revision 295 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=18917&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=18917&group_id=1917&atid=7477</a></p>
</li><li>
<p>18336 in revision 287 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=18336&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=18336&group_id=1917&atid=7477</a></p>
</li><li>
<p>17835 in revision 255 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=17835&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=17835&group_id=1917&atid=7477</a></p>
</li><li>
<p>17412 in revision 242 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=17412&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=17412&group_id=1917&atid=7477</a></p>
</li><li>
<p>15977 in revision 198 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=15977&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=15977&group_id=1917&atid=7477</a></p>
</li><li>
<p>11885 in revision 156 - <a
href="http://rubyforge.org/tracker/index.php?func=detail&aid=11885&group_id=1917&atid=7477">rubyforge.org/tracker/index.php?func=detail&aid=11885&group_id=1917&atid=7477</a></p>
</li></ul>
</li></ul>

<h1>0.5.5</h1>
<ul><li>
<p>Renamed Matches parameter matcher to RegexpMatches for clarity.</p>
</li><li>
<p>Added noframes tag to rdoc index to assist Google.</p>
</li></ul>

<h1>0.5.4</h1>
<ul><li>
<p>Added matches parameter matcher for matching regular expressions.</p>
</li></ul>

<h1>0.5.3</h1>
<ul><li>
<p>Attempt to fix packaging problems by switching to newer version (1.15.1) of
gnutar and setting COPY_EXTENDED_ATTRIBUTES_DISABLE environment variable.</p>
</li><li>
<p>Removed unused ExpectationSequenceError exception.</p>
</li><li>
<p>Added instance_of and kind_of parameter matchers.</p>
</li><li>
<p>Added Google Webmaster meta tag to rdoc template header.</p>
</li><li>
<p>Put Google Webmaster meta tag in the right header i.e. the one for the
index page.</p>
</li></ul>

<h1>0.5.2</h1>
<ul><li>
<p>Fix bug 11885 - “never doesn’t work with stub_everything” submitted by
Alexander Lang. In fixing this bug, also fixed undiscoverd bug where
expected &amp; actual invocation counts were being incorrectly reported
which seems to have been introduced when fixes were added for invocation
dispatch (see MockedMethodDispatchAcceptanceTest).</p>
</li><li>
<p>Previously when an expectation did not allow more invocations, it was
treated as not matching. Now we prefer matching expectations which allow
more invocations, but still match expectations which cannot allow more
invocations. I think this may be overcomplicating things, but let’s see how
it goes.</p>
</li></ul>

<h1>0.5.1</h1>
<ul><li>
<p>Fixed bug #11583 “Mocha 0.5.0 throwing unexpected warnings”. Also switched
on ruby warning for all rake test tasks. Fixed majority of warnings, but
some left to fix.</p>
</li></ul>

<h1>0.5.0</h1>
<ul><li>
<p>Parameter Matchers - I’ve added a few Hamcrest-style parameter matchers
which are designed to be used inside Expectation#with. The following
matchers are currently available: anything(), includes(), has_key(),
has_value(), has_entry(), all_of() &amp; any_of(). More to follow soon. The
idea is eventually to get rid of the nasty parameter_block option on
Expectation#with.</p>

<p>object = mock() object.expects(:method).with(has_key(‘key_1’))
object.method(‘key_1’ =&gt; 1, ‘key_2’ =&gt; 2) # no verification error
raised</p>

<p>object = mock() object.expects(:method).with(has_key(‘key_1’))
object.method(‘key_2’ =&gt; 2) # verification error raised, because method
was not called with Hash containing key: ‘key_1’</p>
</li><li>
<p>Values Returned and Exceptions Raised on Consecutive Invocations - Allow
multiple calls to Expectation#returns and Expectation#raises to build up a
sequence of responses to invocations on the mock. Added syntactic sugar
method Expectation#then to allow more readable expectations.</p>

<p>object = mock() object.stubs(:method).returns(1,
2).then.raises(Exception).then.returns(4) object.method # =&gt; 1
object.method # =&gt; 2 object.method # =&gt; raises exception of class
Exception object.method # =&gt; 4</p>
</li><li>
<p>Yields on Consecutive Invocations - Allow multiple calls to yields on
single expectation to allow yield parameters to be specified for
consecutive invocations.</p>

<p>object = mock() object.stubs(:method).yields(1, 2).then.yields(3)
object.method { |*values| p values } # =&gt; [1, 2] object.method {
|*values| p values } # =&gt; [3]</p>
</li><li>
<p>Multiple Yields on Single Invocation - Added Expectation#multiple_yields to
allow a mocked or stubbed method to yield multiple times for a single
invocation.</p>

<p>object = mock() object.stubs(:method).multiple_yields([1, 2], [3])
object.method { |*values| p values } # =&gt; [1, 2] # =&gt; [3]</p>
</li><li>
<p>Invocation Dispatch - Expectations were already being matched in reverse
order i.e. the most recently defined one was being found first. This is
still the case, but we now stop matching an expectation when its maximum
number of expected invocations is reached. c.f. JMock v1. A stub will never
stop matching by default. Hopefully this means we can soon get rid of the
need to pass a Proc to Expectation#returns.</p>

<p>object = mock() object.stubs(:method).returns(2)
object.expects(:method).once.returns(1) object.method # =&gt; 1
object.method # =&gt; 2 object.method # =&gt; 2 # no verification error
raised</p>

<p># The following should still work…</p>

<p>Time.stubs(:now).returns(Time.parse(‘Mon Jan 01 00:00:00 UTC 2007’))
Time.now # =&gt; Mon Jan 01 00:00:00 UTC 2007
Time.stubs(:now).returns(Time.parse(‘Thu Feb 01 00:00:00 UTC 2007’))
Time.now # =&gt; Thu Feb 01 00:00:00 UTC 2007</p>
</li><li>
<p>Deprecate passing an instance of Proc to Expectation#returns.</p>
</li><li>
<p>Explicitly include all Rakefile dependencies in project.</p>
</li><li>
<p>Fixed old Stubba example.</p>
</li><li>
<p>Fix so that it is possible for a stubbed method to raise an Interrupt
exception without a message in Ruby 1.8.6</p>
</li><li>
<p>Added responds_like and quacks_like.</p>
</li><li>
<p>Capture standard object methods before Mocha adds any.</p>
</li><li>
<p>Added Expectation#once method to make interface less surprising.</p>
</li><li>
<p>Use Rake::TestTask to run tests. Created three separate tasks to run unit,
integration &amp; acceptance tests. Split inspect_test into one file per
TestCase. Deleted superfluous all_tests file.</p>
</li><li>
<p>Fiddled with mocha_inspect and tests to give more sensible results on x86
platform.</p>
</li><li>
<p>Fixed bug #7834 “infinite_range.rb makes incorrect assumption about to_f”
logged by James Moore.</p>
</li></ul>

<h1>0.4.0</h1>
<ul><li>
<p>Allow naming of mocks (patch from Chris Roos).</p>
</li><li>
<p>Specify multiple return values for consecutive calls.</p>
</li><li>
<p>Improved consistency of expectation error messages.</p>
</li><li>
<p>Allow mocking of Object instance methods e.g. kind_of?, type.</p>
</li><li>
<p>Provide aliased versions of #expects and #stubs to allow mocking of these
methods.</p>
</li><li>
<p>Added at_least, at_most, at_most_once methods to expectation.</p>
</li><li>
<p>Allow expects and stubs to take a hash of method and return values.</p>
</li><li>
<p>Eliminate warning: “instance variable @yield not initialized” (patch from
Xavier Shay).</p>
</li><li>
<p>Restore instance methods on partial mocks (patch from Chris Roos).</p>
</li><li>
<p>Allow stubbing of a method with non-word characters in its name (patch from
Paul Battley).</p>
</li><li>
<p>Removed coupling to Test::Unit.</p>
</li><li>
<p>Allow specified exception instance to be raised (patch from Chris Roos).</p>
</li><li>
<p>Make mock object_id appear in hex like normal Ruby inspect (patch from Paul
Battley).</p>
</li><li>
<p>Fix path to object.rb in rdoc rake task (patch from Tomas Pospisek).</p>
</li><li>
<p>Reverse order in which expectations are matched, so that last expectation
is matched first. This allows e.g. a call to #stubs to be effectively
overridden by a call to #expects (patch from Tobias Lutke).</p>
</li><li>
<p>Stubba &amp; SmartTestCase modules incorporated into Mocha module so only
need to require ‘mocha’ - no longer need to require ‘stubba’.</p>
</li><li>
<p>AutoMocha removed.</p>
</li></ul>

<h1>0.3.3</h1>
<ul><li>
<p>Quick bug fix to restore instance methods on partial mocks (for Kevin
Clark).</p>
</li></ul>

<h1>0.3.2</h1>
<ul><li>
<p>Examples added.</p>
</li></ul>

<h1>0.3.1</h1>
<ul><li>
<p>Dual licensing with MIT license added.</p>
</li></ul>

<h1>0.3.0</h1>
<ul><li>
<p>Rails plugin.</p>
</li><li>
<p>Auto-verify for expectations on concrete classes.</p>
</li><li>
<p>Include each expectation verification in the test result assertion count.</p>
</li><li>
<p>Filter out noise from assertion backtraces.</p>
</li><li>
<p>Point assertion backtrace to line where failing expectation was created.</p>
</li><li>
<p>New yields method for expectations.</p>
</li><li>
<p>Create stubs which stub all method calls.</p>
</li><li>
<p>Mocks now respond_to? expected methods.</p>
</li></ul>

<h1>0.2.1</h1>
<ul><li>
<p>Rename MochaAcceptanceTest::Rover#move method to avoid conflict with Rake
(in Ruby 1.8.4 only?)</p>
</li></ul>

<h1>0.2.0</h1>
<ul><li>
<p>Small change to SetupAndTeardown#teardown_stubs suggested by Luke Redpath
(<a href="http://www.lukeredpath.co.uk">www.lukeredpath.co.uk</a>) to allow
use of Stubba with RSpec (<a
href="http://rspec.rubyforge.org">rspec.rubyforge.org</a>).</p>
</li><li>
<p>Reorganized directory structure and extracted addition of setup and
teardown methods into SmartTestCase mini-library.</p>
</li><li>
<p>Addition of auto-verify for Mocha (but not Stubba). This means there is
more significance in the choice of expects or stubs in that any expects on
a mock will automatically get verified.</p>
</li></ul>

<p>So instead of…</p>

<pre class="code ruby"><code><span class='id identifier rubyid_wotsit'>wotsit</span> <span class='op'>=</span> <span class='const'>Mocha</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='symbol'>:thingummy</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='int'>5</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='int'>10</span><span class='rparen'>)</span>
<span class='id identifier rubyid_doobrey'>doobrey</span> <span class='op'>=</span> <span class='const'>Doobrey</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_wotsit'>wotsit</span><span class='rparen'>)</span>
<span class='id identifier rubyid_doobrey'>doobrey</span><span class='period'>.</span><span class='id identifier rubyid_hoojamaflip'>hoojamaflip</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_verify'>verify</span></code></pre>

<p>you need to do…</p>

<pre class="code ruby"><code><span class='id identifier rubyid_wotsit'>wotsit</span> <span class='op'>=</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='rparen'>)</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='symbol'>:thingummy</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_with'>with</span><span class='lparen'>(</span><span class='int'>5</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='int'>10</span><span class='rparen'>)</span>
<span class='id identifier rubyid_doobrey'>doobrey</span> <span class='op'>=</span> <span class='const'>Doobrey</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_wotsit'>wotsit</span><span class='rparen'>)</span>
<span class='id identifier rubyid_doobrey'>doobrey</span><span class='period'>.</span><span class='id identifier rubyid_hoojamaflip'>hoojamaflip</span>
<span class='comment'># no need to verify</span></code></pre>

<p>There are also shortcuts as follows…</p>

<p>instead of…</p>

<pre class="code ruby"><code><span class='id identifier rubyid_wotsit'>wotsit</span> <span class='op'>=</span> <span class='const'>Mocha</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='symbol'>:thingummy</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='int'>10</span><span class='rparen'>)</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_expects'>expects</span><span class='lparen'>(</span><span class='symbol'>:summat</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='int'>25</span><span class='rparen'>)</span></code></pre>

<p>you can have…</p>

<pre class="code ruby"><code><span class='id identifier rubyid_wotsit'>wotsit</span> <span class='op'>=</span> <span class='id identifier rubyid_mock'>mock</span><span class='lparen'>(</span><span class='symbol'>:thingummy</span> <span class='op'>=&gt;</span> <span class='int'>5</span><span class='comma'>,</span> <span class='symbol'>:summat</span> <span class='op'>=&gt;</span> <span class='int'>25</span><span class='rparen'>)</span></code></pre>

<p>and instead of…</p>

<pre class="code ruby"><code><span class='id identifier rubyid_wotsit'>wotsit</span> <span class='op'>=</span> <span class='const'>Mocha</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_stubs'>stubs</span><span class='lparen'>(</span><span class='symbol'>:thingummy</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='int'>10</span><span class='rparen'>)</span>
<span class='id identifier rubyid_wotsit'>wotsit</span><span class='period'>.</span><span class='id identifier rubyid_stubs'>stubs</span><span class='lparen'>(</span><span class='symbol'>:summat</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_returns'>returns</span><span class='lparen'>(</span><span class='int'>25</span><span class='rparen'>)</span></code></pre>

<p>you can have…</p>

<pre class="code ruby"><code><span class='id identifier rubyid_wotsit'>wotsit</span> <span class='op'>=</span> <span class='id identifier rubyid_stub'>stub</span><span class='lparen'>(</span><span class='symbol'>:thingummy</span> <span class='op'>=&gt;</span> <span class='int'>5</span><span class='comma'>,</span> <span class='symbol'>:summat</span> <span class='op'>=&gt;</span> <span class='int'>25</span><span class='rparen'>)</span></code></pre>

<h1>0.1.2</h1>
<ul><li>
<p>Minor tweaks</p>
</li></ul>

<h1>0.1.1</h1>
<ul><li>
<p>Initial release.</p>
</li></ul>
</div></div>
    
    <div id="footer">
  Generated on Wed Apr 25 16:51:30 2012 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.7.5 (ruby-1.9.3).
</div>

  </body>
</html>