similar to: Fwd: Re: [HOWTO] Edgemocha

Displaying 20 results from an estimated 1000 matches similar to: "Fwd: Re: [HOWTO] Edgemocha"

2006 Dec 15
0
Fwd: Re: Re: [HOWTO] Edgemocha
---------- Forwarded message ---------- From: James Mead <jamesmead44 at gmail.com> Date: 15-Dec-2006 17:37 Subject: Re: Re: [HOWTO] Edgemocha To: John Pywtorak <jpywtora at calpoly.edu> On 15/12/06, John Pywtorak <jpywtora at calpoly.edu> wrote: > Compare > ~$ sudo gem install mocha > Attempting local installation of ''mocha'' > Successfully
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.
2006 Sep 03
2
Fwd: Dealing with exec?
---------- Forwarded message ---------- From: Kevin Clark <kevin.clark at gmail.com> Date: 01-Sep-2006 20:31 Subject: Dealing with exec? To: James Mead <jamesmead44 at gmail.com> Hey James, Sorry to bug you. I was curious how you''d handle a call to exec in a method you were testing. Kernel.stubs(:exec)... doesn''t seem to work but I''m not sure where else an
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 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 Sep 21
5
Stubbing yielding methods
I''ve just been tying my brain in knots looking at bug #8687 ( http://rubyforge.org/tracker/index.php?func=detail&aid=8687&group_id=1917&atid=7477 ). I''ve been (1) trying to work out whether there is anything logically wrong with Mocha''s existing behaviour and (2) whether Mocha should support the requested functionality. It all centres around the use of the
2006 Sep 13
2
Problem with RSpec and Mocha/Stubba
I''ve recently upgraded to the latest versions of Mocha and RSpec (0.3.2 and 0.6.3 respectively) and I''m no longer able to use Mocha/ Stubba with RSpec. Its actually only Stubba I''m interested in as I use RSpec''s built-in mocking library. I require stubba in my spec file but whenever I try and run my spec it fails with the error: Unintialized constant
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 Jun 11
12
Mocking system/`
This drives me insane on a regular basis. How does one mock system(''blah'') or `blah` ? Adding expectations on Kernel doesn''t do it. Adding expectations on Object just makes me sad: Object.any_instance.expects(:system).with(''ls'') # => #<Mock:0x12b584e>.system(''ls'') - expected calls: 0, actual calls: 1 And this really
2006 Dec 19
9
Stubbing ActiveRecord Models gets very difficult with instance methods
I have seen some basic examples of using Mocha and Stubba with ActiveRecord Models; However, the ones I read were somewhat simplistic. That is they stubbed the find class method of the model, or the execute method of the connection object. While stubbing the find method had the desired effect for the author it did not help with a situation I was hacking away on. Which was writing a test case
2007 Nov 13
5
how to ensure signature compliance while mocking in ruby
On 13/11/2007, Pradeep Gatram <pradeep.gatram at gmail.com> wrote: > > Let me put my dilemma as an example. Take a look at a snippet from > FooTest. > > #using mocha > def test_method1 > Bar.expects(:method2).with(''param1'', ''param2'').once > Foo.method1 > end > > And now the implementation > > class Foo > def
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 Mar 05
4
When to stub/when to mock (was Rails functional testing and Mocha)
Hi James, > From: James Mead <jamesmead44 at gmail.com> > Date: Mar 5, 2007 5:15 AM > Subject: Re: [mocha-developer] Rails functional testing and Mocha > To: mocha-developer at rubyforge.org > "I''d probably stub the call to find not expect it, because its a query not a command" I have a different perspective on when to use stubs and when to use mocks and
2006 Sep 11
4
Using rspec and mocha
I prefer to use rspec than test::unit for developing my apps. However I''ve found its mocking library to be pretty inflexible compared to Mocha. This isn''t really a surprise since rspec isn''t intended as a mocking framework, whereas Mocha is. So I''d like to play to both of their strengths and use rspec as my testing/specification framework and Mocha do to
2006 Sep 11
4
Using rspec and mocha
I prefer to use rspec than test::unit for developing my apps. However I''ve found its mocking library to be pretty inflexible compared to Mocha. This isn''t really a surprise since rspec isn''t intended as a mocking framework, whereas Mocha is. So I''d like to play to both of their strengths and use rspec as my testing/specification framework and Mocha do to
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 Jan 02
0
Mocha
On 31/12/06, Tobias L?tke <tobias.luetke at gmail.com> wrote: > > I just replaced various homegrown stubbing and mocking facilities in > Shopify and wanted to let you know my appreciation for this fantastic > library of yours. I love the user interface and the internal code is > something to behold as well. Thanks - I''m glad you''ve found it useful.
2007 Oct 07
0
Supressing RDoc links
I recently noticed some anomalies in the Mocha RDoc. Within a method RDoc comment, any word that happens to be the same as a method in the same class gets turned into a link. You can see an example [2] with the word "once" and another [3] with the words "yields", "times" and "with". Does anyone know how to stop these words incorrectly being made into
2007 Apr 12
15
Preview of Latest Mocha Changes
I''ve finally managed to find some time to do some serious work on Mocha. There are some code snippets on my blog (http://blog.floehopper.org/articles/2007/04/12/preview-of-latest-mocha-changes) showing the new functionality available in trunk (revision 128). I don''t don''t know how many people out there are using trunk, but it would be great to get some feedback on these
2008 Jun 12
2
Anyone using trunk?
Has anybody been using Mocha trunk over the last month or two? I''ve done quite a bit of internal refactoring and wondered whether anyone had any problems. There are also a bunch of new features e.g. states, sequences, extra parameter matchers & configurable warnings, but these are not documented in the on-line rdoc. I wondered if anyone has been looking at the rdoc in trunk and