Displaying 10 results from an estimated 10 matches similar to: "yielding consecutive values"
2006 Sep 29
2
multiyield
I lied, I don''t actually need different responses each time I call
the method. So the last email of mine is probably worthless.
Instead, I need yield to yield 3 values when I call it once:
(behavior that mimics Find.find)
def test_generate(documentation = ''/test_documentation/'',
destination = ''/destination/'')
2006 Sep 22
2
foo.expects(:blah).returns(10).then(11) syntax
I recently needed the behavior of my object to change on subsequent
method calls so I added the syntax above.
Here''s the diff of changes I made:
Index: test/mocha/expectation_test.rb
===================================================================
--- test/mocha/expectation_test.rb (revision 854)
+++ test/mocha/expectation_test.rb (working copy)
@@ -95,6 +95,12 @@
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 Feb 16
0
[#8687] Block''s return value is dropped on stubbed yielding methods.
Erik Hetzner has submitted a bug with a suggested patch...
> Best explained with an example:
>
> test:
>
> foo = mock()
> bar = mock().stubs(:get_baz).returns(:baz)
> foo.stubs(:with_something).yields(bar)
>
> real code:
>
> baz = foo.with_something do |bar|
> bar.get_baz.to_s
> end
>
> baz should now be "baz", but is nil because we have
2003 Oct 27
1
Bioassays Yielding concentration-Mortality data
Dear all,
I'm trying reproduce an example of bioassays Yielding Concentration-Mortality Data particularly control - adjustment model from book Bioassay of Entomopathogenic Microbes and Nematodes chapter 7 with R.
I used glm with family=binomial and link=probit, but I do not know how to implement parameter gamma (control mortality - mortality of the untreated control insect in this exaple)
2007 Apr 11
0
Fwd: [ mocha-Bugs-8687 ] Block''s return value is dropped on stubbed yielding methods.
---------- Forwarded message ----------
From: noreply at rubyforge.org <noreply at rubyforge.org>
Date: 11-Apr-2007 15:31
Subject: [ mocha-Bugs-8687 ] Block''s return value is dropped on stubbed
yielding methods.
To: noreply at rubyforge.org
Bugs item #8687, was opened at 2007-02-15 17:29
You can respond by visiting:
2010 Jul 19
1
heatmap.2() yielding an inappropriate key?
Esteemed R-users,
heatmap.2() is yielding an inappropriate key based on my colors and
break-points.
In the reproducible example below, the key is inappropriate (to me) because-
1. 'Orange' is simply not represented in the key, despite its prescence
in the heatmap.
2. The proportions of the key are clearly out, ie., my largest bin, (0.1
- 0.2) is half the range, but this bin (colored
2018 Jul 03
2
Why Clang is yielding different LLVM IR return type for the same function
Hi:
So I have a library function called fooo() in a source file B.c and an external A.c file that is referencing a function fooo() in it.
foo is returning a pointer to a structure
A.ll:
%struct._bar= type { %struct._foo, i32, i32 (%struct.doo*, %struct.doo*, %struct.doo*)* }
declare i8* @fooo() #2
B.ll:
%struct._bar= type { %struct._foo, i32, i32 (%struct.doo*, %struct.doo*, %struct.doo*)* }
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
2007 May 25
9
Scaling Asterisk: Dual-Core CPUs not yielding gains at high call volumes
List users,
Using Asterisk in an inbound call center environment has led us to
pushing the limits of vertical scaling. In order to treat each caller
fairly and to utilize our agents as efficiently as possible, it is
desirable to configure each client as a single queue. As far as I know,
Asterisk's queues cannot be distributed across servers, so the size of
the largest queue we service