Displaying 20 results from an estimated 23 matches for "beevers".
Did you mean:
beavers
2007 Nov 04
3
Returning the mock associated with an expectation.
I was reading through the FlexMock docs and noticed the expectation
method .mock, which returns the original mock associated with an
expectation.
It looks really handy for writing nice all-in-one mocks like:
mock_user = mock(''User'').expects(:first_name).returns(''Jonah'').mock
So I started playing around with mocha and found I could actually
already do this!
2008 Jan 02
2
Proxies
...idea of using
the Mock Proxy to exercise the behavior of simple private instance
methods of my class which are kind of a pain to test currently, which
leads to my not making anything private.
On Jan 2, 2008 6:50 AM, James Mead <jamesmead44 at gmail.com> wrote:
>
> On 05/11/2007, Duncan Beevers <duncanbeevers at gmail.com> wrote:
> > The block syntax looks excellent, and reads very nicely. I especially
> > like the idea of not having to pass in the mock to the block to stick
> > the expectations onto, and instead just continue fluently adding
> > expectation...
2006 Feb 17
3
CPU time stats
hi,
I am trying to find out the avg cpu time spent in each of my user
methods (exclusive of other methods invoked by a method).
Hence the following snippet failed miserably:
-----------------------
pid$target:a.out::entry
{ time[probefunc] = timestamp;}
pid$target:a.out::return
{ @spent[probefunc] = avg(timestamp - time[probefunc]);}
END
{ printa(@spent);}
2007 Jan 10
2
[DTrace] using C preprocessor in dtrace scripts
...ly without the include, maybe it''s better just to
hard-code the value of M_DATA, or if you want to continue to use the name,
simply copy the definition, e.g.
#!/usr/sbin/dtrace -Cs
/* Copied from /usr/include/sys/stream.h */
#define M_DATA 0x00
strrput:entry
... etc etc ...
--
Philip Beevers
Fidessa Infrastructure Development
mailto:philip.beevers@fidessa.com
phone: +44 1483 206571
> -----Original Message-----
> From: Max Bruning [mailto:max@bruningsystems.com]
> Sent: 29 December 2004 01:42
> To: dtrace@opensolaris.org
> Subject: [DTrace] using C preprocessor in dtra...
2007 Jun 29
0
[networking-discuss] Re: DTraceNetwork Providers, take 2
...I can say that many
stock exchange data feeds are provided over UDP - including some that
are in the 10s of MBits/sec range today, and are predicted to move into
the 100s of MBits/sec range soon. Consuming these feeds is a
latency-critical business and good diagnostic tools are vital.
--
Philip Beevers
Fidessa Infrastructure Development
mailto:philip.beevers at fidessa.com
phone: +44 1483 206571
********************************************************************************************************************************************************************************************
This message...
2010 May 03
1
Plotting the explanatory against the dependent in a GAM
...against the dependent variable (just as in Carlslaw et al. 2007, fig. 1*).
Otherwise, I'd like to know how to plot the smoothed predictor variable values against the partial residuals.
Thank you for taking the time to read my message. Any?help is gratefully appreciated,
Oscar
* Carslaw, D., Beevers, S.,?Tate, J. 2007. Modelling and assessing trends in traffic-related emissions using a generalised additive modelling approach. Atmospheric Environment 41 (2007) 5289?5299
2008 Jan 28
9
Nested matchers
We''re encountering a failure with Mocha 0.5.6.
We had this expectation:
game_version.expects(:attributes=).with(:game_file =>
kind_of(GameFile), :game_id => @game.id)
This expectation was passing with 0.5.5, but fails with 0.5.6.
I added this test to parameter_matcher_acceptance_test.rb, which
passes in 0.5.5 and fails in 0.5.6
def test_should_match_nested_parameters
2005 Dec 21
0
ustack() issues && correlating SIGSEGV activ ity?
...og has a
good example of using libumem to track leaks; looking for bad memory access
is similar.
However, once you''ve narrowed down where your crash might be, DTrace and
particularly speculations are very powerful tools for providing more
information about the crash scenario.
--
Philip Beevers
Fidessa Infrastructure Development
mailto:philip.beevers at fidessa.com
phone: +44 1483 206571
******************************************************************
This message is intended only for the stated addressee(s) and
may be confidential. Access to this email by anyone else is
unautho...
2005 Dec 21
1
ustack() issues && correlating SIGSEGV activity?
Howdy,
I was playing around with the malloc/free D script provided by
Philip Beevers:
http://www.opensolaris.org/jive/thread.jspa?threadID=4224&tstart=15
And decided to change the free:entry probe from:
pid24169::free:entry
/ sz[arg0] /
{
printf("Freeing %p (size %d)\n", arg0, sz[arg0]);
sz[arg0] = 0;
}
to:
pid24169::free:entry
/ ! sz[arg0] /
{
pri...
2008 Jul 14
15
CPC provider - input welcome
Tracing Fans,
I know it''s been a long time in coming but the CPU Performance
Counter (CPC) provider is almost here! The code is currently in
for review and a proposed architecture document is attached here
for review.
Any and all feedback/questions on the proposed implementation
is welcome.
Thanks.
Jon.
-------------- next part --------------
An embedded and charset-unspecified text
2005 Sep 15
10
Can I use printa() for printing multiple agg regations?
...print in the different
orders? e.g. printa() for sort by sample, printak() for sort by key.
My reason for wanting to do both in the same script is that the current
printa() ordering is nearly always right; it''s relatively (although very
useful in those cases) to order by key.
--
Philip Beevers
Fidessa Infrastructure Development
mailto:philip.beevers at fidessa.com
phone: +44 1483 206571
> -----Original Message-----
> From: dtrace-discuss-bounces at opensolaris.org
> [mailto:dtrace-discuss-bounces at opensolaris.org]On Behalf Of Bryan
> Cantrill
> Sent: 15 September 2005...
2005 Nov 25
28
ZFS and memcntl(..., MC_SYNC, ...)
...r 8KBytes on an otherwise idle
SCSI disk on SPARC. The good news is that this is very fast on ZFS - on the
same disk, about 7ms constant for up to 64KBytes, and about 20ms constant
for 256KBytes. However this is still a bit slower than the msync(3C)
approach on UFS]
Thanks in advance.
--
Philip Beevers
mailto:philip.beevers at ntlworld.com
2008 Jun 12
2
Google Group?
A number of people have had difficulties subscribing and/or sending
messages to the existing mailing list.
Also I have to spend quite a bit of time moderating spam and the
mailman interface is pretty clunky.
So I was contemplating setting a Google Group up instead. Does anyone
have any objections?
--
James.
http://blog.floehopper.org
http://tumble.floehopper.org
2007 Sep 11
3
Expectations on portions of arguments called.
I''d like to create expectations on just portions of the arguments a
function takes.
For example, I want to verify that the a certain ActiveRecord
association extension adds an order clause to the find options hash.
Currently I simply check the entire argument structure, something like this
def test_referring_journals_should_order_by_citation_count
article =
2007 Oct 25
4
Insure a method is called with no arguments.
We''ve been working with the ParameterMatchers (so cool!) but I don''t
see a way to insure a method is called with no arguments.
I imagined something like:
user = mock(''User'')
user.expects(:friends).with(nothing)
Anyone run into this?
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
2012 Jun 04
13
Nested Resource Route Helpers
Hello all,
I''m working on a Rails app and I have resources nested three deep - let''s
call them user, project, and issues. The route helpers now look like
user_project_issue_path(@user, @project, @issue). Would it make sense for
Rails to guess the @user <https://github.com/user> and @project<https://github.com/project> relations
from @issue
2005 Dec 22
2
zpool iostat output gets buffered
I''m trying to write a SLAMD (http://www.slamd.com/) resource monitor
that can be used to measure the I/O throughput on a ZFS pool, and in
particular to be able to get the read and write rates. In order to do
this, I''m basically executing "zpool iostat {interval}" and parsing the
output to capture the values in the "bandwidth read" and "bandwidth
2007 Jul 30
6
Object.stubs doesn''t seem to work.
Hi
I''m using Mocha 0.5.3 and I want to stub out a call to Time.now, just
like the example in the post
http://blog.floehopper.org/articles/2007/06/08/mocha-0-5-released
However, trying it in irb gets me the following error:
>> require ''mocha''
=> true
>> Time.stubs(:now).returns(Time.parse(''Thu Feb 01 00:00:00 UTC 2007''))
NoMethodError:
2008 May 20
7
Expect with "real world" returns?
Is there a way to do something like this?
class Foo
def self.hello(name)
"Hello #{name}!"
end
end
Foo.expects(:bar).with("Carl").once
assert_equal "Hello Carl!", Foo.hello
Basically, my problem is that once you set an expectation, the
original code is never executed and is not tested. However, it''s
still very useful to set expectations to