similar to: Isn''t it possible to stub / expect on :id ?

Displaying 20 results from an estimated 400 matches similar to: "Isn''t it possible to stub / expect on :id ?"

2011 Apr 16
2
superimpose graphs
Hi there, I have a data frame DF of over 600 people's short term trade data in time order. Below is the simplified structure of the data. id invest payout [1] 1 10 -1 [2] 1 33 33 [3] 1 20 -5 [4] 2 200 33 [5] 2 33 -20 [6] 3 5 -5 [7] 3 5
2011 Apr 16
1
600 people's time series
Hi there, I have a data frame DF of over 600 people's short term trade data in time order. Below is the super simplified structure of the data. id invest payout [1] 1 10 -1 [2] 1 33 33 [3] 1 20 -5 [4] 2 200 33 [5] 2 33 -20 [6] 3 5 -5 [7] 3
2007 Apr 26
3
A coding question involving variable assignments in ifelse()
Dear List, Below is a simple, standard loss model that takes into account the terms of an insurance policy: deductible <- 15 coverage.limit <- 75 insurance.threshold <- deductible + coverage.limit tmpf <- function() { loss <- rlnorm(rpois(1, 3), 2, 5) sum(ifelse(loss > insurance.threshold, loss - coverage.limit, pmin(loss, deductible))) } net <- replicate(1000000, tmpf())
2008 Dec 04
2
Ruby fun with MegaMillions
I thought I would write a lottery number generator since I have not had any luck winning the big jackpot - http://megamillions.com/. So far, after over 1.2 million tries, I still have not hit all the numbers from yesterday: 2, 17, 22, 32, 51, 35 (last one is the mega ball). Fun little project that and I thought others would be interested. Let me know if you have a cleaner implementation in mind.
2012 Jan 13
1
Portfolio Optimization
Hi, I'm an R newbie and I've been struggling with a optimization problem for the past couple of days now. Here's the problem - I have a matrix of expected payouts from different stock option strategies. Each column in my matrix represents a different stock and each row represents the return to the strategy given a certain market move. So the rows are not a time series of percentage
2011 May 31
1
while loop problems
Hi , i am trying to get this loop in my r program to work but it is not giving me the results that I desire. I am trying to model an insurance contract where there are n securities that have a fixed likelihood of default vector(data[i,2]) and a payout vector(data[i,1]). i need to price the value of stop losses at the security level and at the portfolio level. to do this i created two while loops
2007 Sep 06
5
Removing/overriding/unstubbing a stub?
We''re using Mocha stubs to stub out a slow-performing network request in a Test::Unit class. But naturally, we don''t want to stub it out in the few tests that actually verify the functionality of that network request. Is there a way to do the stub in "setup", but override it for the few tests that need the original functionality? (I realize that in this case, the
2007 Jan 02
4
allow stubbing of previously defined methods such as "id"
On my current project I needed to create a stub that responded correctly to the id message. Here''s the change I put into my copy of head. Index: lib/mocha/mock_methods.rb =================================================================== --- lib/mocha/mock_methods.rb (revision 1114) +++ lib/mocha/mock_methods.rb (working copy) @@ -68,6 +68,7 @@ method_names =
2009 Apr 27
1
Extract one element from yahooKeystats data
I am trying to extract one particular piece of data(Float) from all the data returned by yahooKeystats, but thus far I'm having no luck. This is what I've got so far: > library(fImport) Loading required package: timeSeries Loading required package: timeDate > data<-yahooKeystats("IBM") trying URL 'http://finance.yahoo.com/q/ks?s=IBM' Content type 'text/html;
2019 Feb 24
2
SAMBA DNS interfaces set to br0
On a machine with virtual networking is enabled and two ether net controllers eth0/192.168.1.2 and eth1/192.168.1.3 and having SAMBA smb.conf set to: dns interfaces = lo br0 is there a chance for: 1) The system not to boot with DNS working 2) The DNS server bounce between eth0 and eth1 3) The DNS server portion work on boot sometimes on eth0, but when software restarted only work on eth1 or
2010 Jun 15
2
[LLVMdev] Question on X86 backend
Hi Micah, > In X86InstrInfo.td for Call Instructions, it mentions that Uses for > argument registers are added manually. Can someone point me to the > location where they are added as the comment doesn't reference a > where or how? the register uses are added by the function X86TargetLowering::LowerCall() during the DAG Lowering phase. This is the relevant code segment: // Add
2008 Mar 06
0
Thank you all for your overwhelming response !!!
Thank you all for your overwhelming response !!! The site has awarded me and my downline an oppourtunity to make 27 US Dollars (20$ + 6$ + 1$) right after the registration is done. So, in addition to 6$ opening Survey, you all have 5 more 4$ surveys totalling to an amount of 20$ and one more March special survey for 1$ (which will also make you eligible for a lucky draw of 500$ -- Try your luck).
2007 Jan 17
8
Mocha Mock''s hanging on after test run?
Hi guys, I''m running mocha (0.3.2) against Rails core and just found an issue where the mock doesn''t go away after the test is run. For example: def test_reset_bang_doesn_reinstall_named_routes ActionController::Routing::Routes.named_routes.expects(:install).never @session.reset! end def test_zzz puts ActionController::Routing::Routes.named_routes.inspect
2006 Oct 08
9
Organizing tests and mocha expectations
I''m simultaneously getting into using Mocha and RSpec-style tests (courtesy of the simply_bdd plugin) and I''m struggling with some issues while trying to organize my specs/test. Here''s a code example illustrating the problem: context "update cliient invalid data" do include ClientsControllerSpecHelper specify "should render edit form" do
2007 Sep 05
2
how to test timeouts? that #returns deprecation again...
I''m writing quite a few specs lately that use Ruby''s Timeout::timeout functionality, making sure that timeout errors are properly handled and everything flows right when some command line tools timeout. I like being able to use Mocha''s #returns right now to force a method to raise a TimeoutError, but I know that usage is going away at some point. I''d like to
2014 Nov 09
1
Bug#767295: Bug#767295: Bug#767295: xl: apparent memory leak
On 11/09/2014 07:18 AM, Gedalya wrote: > That memory block is just a bit larger than the size of the initrd in > the VM, could there be a connection? Nope. I changed the initrd to 2.6mb and that memory block is still exactly at 23852 / 14464 / 14464. Actually the process size is around 12 mb when pygrub is counting down to boot, then jumps up to 14+ mb
2015 Jun 07
43
[Bug 90887] New: PhiMovesPass in register allocator broken
https://bugs.freedesktop.org/show_bug.cgi?id=90887 Bug ID: 90887 Summary: PhiMovesPass in register allocator broken Product: Mesa Version: git Hardware: All OS: All Status: NEW Severity: normal Priority: medium Component: Drivers/DRI/nouveau Assignee: nouveau at
2007 Dec 18
0
PTC 0.01 / 0.2 $ global-click.info
New PTC site, pays 0.01 $ for your and referal ad view!! Upgraded members get 0.2$ for ad view! Min payout 10$!! register now! http://global-click.info/?r=eddys -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send
2019 Feb 24
0
SAMBA DNS interfaces set to br0
Am 24.02.19 um 16:51 schrieb Brian Davis via samba: > On a machine with virtual networking is enabled and two ether net > controllers eth0/192.168.1.2 and eth1/192.168.1.3 and having SAMBA smb.conf > set to: > > dns interfaces = lo br0 > > is there a chance for: > > 1) The system not to boot with DNS working > 2) The DNS server bounce between eth0 and eth1 > 3)
2006 Sep 08
1
A quick guide to Mocha
Hello :) Having just gone through the (admittedly simple) API of Mocha to learn how it works, I wrote a quick guide (190 lines) to help others get up to speed. I''ve attached it as RDOC and as HTML. It is a first draft - please help me improve by giving feedback ! Contents : Overview - Quick overview of Mocha Unit testing, mock object and stubs - Very quick introduction to mock