similar to: Mocha

Displaying 20 results from an estimated 1000 matches similar to: "Mocha"

2008 Jan 20
2
Bug #17118 - expectations should take precedence over stubs
I wanted to draw attention to this bug report [A] which highlights a change that was made between Mocha 0.4 and 0.5. It may have lead to tests which pass unexpectedly. Does my explanation (below) make sense to people? It feels like we should at least add some warnings to the documentation. You are correct that this behaviour did change between Mocha v0.4.0 and > v0.5.0 (in revision 115).
2008 Jan 02
2
Proxies
I really like the idea of Mock Proxies as explained in Brian Takita''s post here: http://pivots.pivotallabs.com/users/brian/blog/articles/352-introducing-rr I posted to this list eariler with an incomplete implementation of .stops_mocking in the thread "Mocking Time, delegating to original object." The Mock Proxy pattern would make this simpler.
2007 Jan 24
0
Mocha 0.4 released
So I finally got round to releasing a new version<http://rubyforge.org/frs/?group_id=1917&release_id=9184>of Mocha <http://mocha.rubyforge.org/>. Much of the functionality has been available for some time if you''ve been using the Rails plugin based on subversion HEAD, but now you can get it in all in a gem (or other package). The most recent changes centre around allowing
2007 Apr 11
0
Fwd: [ mocha-Feature Requests-5856 ] Stubbing of private methods should be allowed
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 11-Apr-2007 15:31 Subject: [ mocha-Feature Requests-5856 ] Stubbing of private methods should be allowed To: noreply at rubyforge.org Feature Requests item #5856, was opened at 2006-09-22 17:03 You can respond by visiting:
2007 Feb 05
10
how does Mocha compare in terms of classical vs mock-based testing, and stubbing???
Hi guys, I''ve just been reading Martin Fowler''s article re mock versus stubbing<http://martinfowler.com/articles/mocksArentStubs.html>where he compares traditional TDD testing techniques with mock based testing. I''d be interested in comments from a ruby on rails perspective in terms of this and Mocha? For example: a) Do you see Mocha as a robust way to test Ruby
2007 Dec 23
0
Fwd: [ mocha-Bugs-16523 ] Ruby 1.9 gives warning
FYI - I''ve just released Mocha 0.5.6 to make Ruby 1.9 compatibility fixes available for those using released packages rather than subversion trunk. I''m not feeling well and so haven''t been able to test it other than by running all the tests using Ruby 1.9. Please let me know if you have any problems using it. Remember that it sometimes takes a while for a new gem
2007 Sep 11
1
Fwd: [ mocha-Feature Requests-13763 ] add with_any_arguments method
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 7 Sep 2007 22:43 Subject: [ mocha-Feature Requests-13763 ] add with_any_arguments method To: noreply at rubyforge.org Feature Requests item #13763, was opened at 2007-09-07 17:43 You can respond by visiting:
2007 Mar 09
0
Fwd: Mocha raise exception first call, return value second call
---------- Forwarded message ---------- From: James Mead <jamesmead44 at gmail.com> Date: 07-Mar-2007 10:04 Subject: Re: Mocha raise exception first call, return value second call To: ruby-talk at ruby-lang.org On 07/03/07, Raymond O''Connor <nappin713 at yahoo.com> wrote: > > Is there a way to have mocha raise an exception the first time an stub > is called, and then
2007 Dec 20
0
Fwd: [ mocha-Patches-16424 ] Ruby 1.9 Compatibility
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 20 Dec 2007 15:48 Subject: [ mocha-Patches-16424 ] Ruby 1.9 Compatibility To: noreply at rubyforge.org Patches item #16424, was opened at 2007-12-19 02:43 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7479&aid=16424&group_id=1917 Category: None
2007 Oct 25
0
Fwd: [ mocha-Feature Requests-15021 ] without or not params matcher
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 25 Oct 2007 14:01 Subject: [ mocha-Feature Requests-15021 ] without or not params matcher To: noreply at rubyforge.org Feature Requests item #15021, was opened at 2007-10-24 15:33 You can respond by visiting:
2006 Oct 25
5
Mocha, Stubba and RSpec
Hi, I''ve been reading with interest the threads trying to integrate Mocha and Stubba with RSpec. So far, I''ve made the two changes in spec_helper.rb suggested, but discovered another one that neither of the archives mentions: If you use traditional mocking: object = mock or the stub shortcut : object = stub(:method => :result), you run into namespace conflicts with
2007 Mar 12
10
using mocha with rspec
Hi folks. I''ve just started using rspec and I have to say it''s very nice. The thing is, I prefer mocha''s mocking dialect. So I thought a simple require ''mocha'' would set me up. Unfortunately, rspec does all its goodness using do/end blocks in anonymous classes, so it wasn''t quite that obvious. Anyway, here is the incantation I ended up
2007 Jun 08
4
Mocha 0.5 released
* Hamcrest-style parameter matchers * Values returned and exceptions raised on consecutive invocations * Yields on consecutive invocations * Multiple yields on single invocation * Invocation dispatch fixed * Deprecated returning result of a Proc -- James. http://blog.floehopper.org
2006 Sep 03
0
Reducing object polution and mocha?
Hi Kevin, Not currently, I''m afraid - I always realised it was a possible problem, but we haven''t run into it in our use of Mocha so far. I guess you''re pushing the envelope with it, which is great. If you only need to do it for one or two objects, you could just undefine the offending methods. In the meantime I''ll look into a better solution. It may not be
2007 Jul 04
0
Fwd: [ mocha-Bugs-12001 ] Method call count is not reported correctly on error
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 04-Jul-2007 19:21 Subject: [ mocha-Bugs-12001 ] Method call count is not reported correctly on error To: noreply at rubyforge.org Bugs item #12001, was opened at 2007-07-04 15:21 You can respond by visiting:
2007 Jul 04
0
Fwd: [ mocha-Bugs-11885 ] never doesn''t work with stub_everything
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 30-Jun-2007 14:33 Subject: [ mocha-Bugs-11885 ] never doesn''t work with stub_everything To: noreply at rubyforge.org Bugs item #11885, was opened at 2007-06-27 14:13 You can respond by visiting:
2007 Apr 11
0
Fwd: [ mocha-Bugs-6416 ] Mock objects shouldn''t define #to_s
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 11-Apr-2007 15:07 Subject: [ mocha-Bugs-6416 ] Mock objects shouldn''t define #to_s To: noreply at rubyforge.org Bugs item #6416, was opened at 2006-10-31 15:34 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=7477&aid=6416&group_id=1917
2006 Dec 02
0
Fwd: Re: Mocha and ActiveRecord
---------- Forwarded message ---------- From: J. B. Rainsberger <jbrains762 at gmail.com> Date: 02-Dec-2006 02:48 Subject: Re: Mocha and ActiveRecord To: ruby-talk ML <ruby-talk at ruby-lang.org> James Mead wrote: > On 28/11/06, J. B. Rainsberger <jbrains762 at gmail.com> wrote: >> >> Suppose I have an Order, which has_many OrderItems. Suppose I want to >>
2007 Feb 02
0
Fwd: [ mocha-Bugs-7834 ] infinte_range.rb makes incorrect assumption about to_f
Thanks for reporting the bug below. You''re absolutely right. Renamed Range#to_s implementation to #mocha_inspect and checked first and last respond_to?(:to_f) as you suggested. Sorry for the delay - I wasn''t monitoring the rubyforge trackers. I am now! Should be fixed in revision 99 of trunk. -- James. http://blog.floehopper.org ---------- Forwarded message ---------- From:
2007 Feb 23
0
Fwd: Mocha test retry to connect up to 10 times
---------- Forwarded message ---------- From: Raymond O''connor <nappin713 at yahoo.com> Date: 23-Feb-2007 08:20 Subject: Re: Mocha test retry to connect up to 10 times To: ruby-talk ML <ruby-talk at ruby-lang.org> Hemant Kumar wrote: > On Fri, 2007-02-23 at 14:57 +0900, Raymond O''connor wrote: >> >> Any help would be greatly appreciated, thanks!