similar to: Varying test data

Displaying 20 results from an estimated 4000 matches similar to: "Varying test data"

2006 May 11
2
Reuse code
Hi, I have several helper methods that I use on one view . Is there a way to share this methods on several views ? To be more specific in: companies_helper I''ve defined the helper methods that I would like to use in products section. Thanx, Ovidiu
2007 Dec 29
15
Do you think it would look cleaner?
I was looking over some of my specs. I was thinking that the following: @game.should_receive(:name).and_return(''The Battle for Blaze'') @game.should_receive(:people).and_return(5000000) @game.should_receive(:activated).and_return(true) Would it look cleaner if I could do this instead? @game.should_recieve_and_return( :name => ''The Battle for Blaze''
2008 Jan 08
47
specs on private methods
How does a person test private methods? Is there a way to declare them as private, but retain any tests that were written during the initial development? Thanks. -- Posted via http://www.ruby-forum.com/.
2006 Apr 21
9
Capistrano, OS X
If you installed your copy of ruby via DarwinPorts, the hashbang lines at the top of your dispatch.* scripts says "#!/opt/local/bin/ruby". This is a problem, if you''re deployin via Capistrano to a host with a different path to ruby (which would be practially all of them:-) Here''s a fix. Add this "fix_hashbangs.rb" script to your script directory.
2010 Aug 26
1
list of closures
Hi, I wanted to create a list of closures. When I use Map(), mapply(), lapply(), etc., to create this list, it appears that the wrong arguments are being passed to the main function. For example: Main function: > adder <- function(x) function(y) x + y Creating list of closures with Map(): > plus <- Map(adder,c(one=1,two=2))> plus$one(1)[1] 3> plus$two(1)[1] 3 Examining what value
2024 Apr 12
1
Debugging functions defined (locally) inside another functions
? Fri, 12 Apr 2024 12:15:07 +0000 Iago Gin? V?zquez <iago.gine at sjd.es> ?????: > f <- function(whatever){ > ... > g <- function(whatever2){ > ... > } > ... > } > > If I wanted to debug some thing directly inside f I would do > debug(f). But this does not go inside g code. On the other hand, > debug(g) does not work as g is not a
2006 Apr 27
12
ducktyping ruby
Hi, Does anyone know is there some ruby configurations that can be done to make ruby act a little more like a statically typed language???I love its dynamic nature, but miss the safety that comes from statically typed languages like java??. Cheers in advance -- Posted via http://www.ruby-forum.com/.
2008 Mar 20
1
stories with selenium and the db
Hi all Tonight I wanted to test out selenium in a story to test some ajax stuff on a page. After struggling for an hour or two with disappearing database objects I found the solution in a blog post by Kerry Buckley. with the comment included it reads: # Don''t add an ActiveRecordSafetyListener, or it''ll roll stuff back class Spec::Story::Runner::ScenarioRunner def
2007 Oct 04
16
Spec/Test Speed
Just wanted to pick some smart people about this topic: What are you guys doing to increase the speed of your specs? I''m a big fan of autotest, but right now my current project has 438 specs (for rails). Most of them are in the model, and for all of them we are hitting the database (they are more functional specs than unit-tests). The whole suite takes 112 seconds (meaning the
2007 Oct 18
12
first cut at blockless given/when/then
Hi all, I committed a first cut at blockless Givens/Whens/Thens to RSpec''s trunk: cd /path/to/rspec/project svn up cd rspec bin/spec examples/story/calculator.rb Take a look at examples/story/calculator.rb to see what''s going on. Needs docs!!!! Thoughts welcome. I''ve also got a cut at the plain text parser checked in, but it''s not hooked up to anything
2005 Jul 27
3
[LLVMdev] How to define complicated instruction in TableGen (Direct3D shader instruction)
Each register is a 4-component (namely, r, g, b, a) vector register. They are actually defined as llvm packed [4xfloat]. The instruction: add_sat r0.a, r1_bias.xxyy, r3_x2.zzzz Explaination: '.a' is a writemask. only the specified component will be update '.xxyy' and '.zzzz' are swizzle masks, specify the component permutation, simliar to the Intel SSE permutation
1996 Dec 06
1
Stupid passwd tricks: User with blank GECOS can''t change passwd
I have discovered that a user who has a blank GECOS field in the passwd file under RedHat 4.0 (Colgate) is unable to change passwords. Running the passwd command goes like this: [user@host user]$ passwd Password: [entry of old passwd] New password: [entry of new passwd] [user@host user]$ echo $! 1 [user@host user]$ Setting the name field in the GECOS seems to solve this problem. [mod: While
2005 Jul 29
0
[LLVMdev] How to define complicated instruction in TableGen (Direct3D shader instruction)
Actually the problems that Tzu-Chien Chiu are encountering are similar to what should be done for generating SSE code in the X86 backend and also other SIMD instruction sets. I think LLVM neeeds to add instructions for permuting components, extracting and injecting elements in packed types. If the architecture has instructions which can do permutations for each instruction (for example
2008 May 29
1
akima interpolation and triangulation question
Dear all; First of all, this is probably a more conceptual question than a R-related one, but still want to give it a try. When working with the interpolation function "interp" from the package akima and the triangulation function "tri.mesh" from package tripack I've got NA's for the interpolation and "error" for the triangulation. The data is arranged in a
2024 Apr 12
1
Debugging functions defined (locally) inside another functions
Thank you Ivan, your example solves my issue this time through debug(environment(Adder$add)$add) Just for the future, you say Moreover, `g` doesn't exist at all until f() is evaluated and reaches this point. If `f` was a function, it would be possible to trace() it, inserting a call to debug(g) after it's created. How should I call trace() if f was a function? Best
2006 Oct 11
5
Where is djvmti Agent?
What am I missing? [Download dvm.zip from https://solaris10-dtrace-vm-agents.dev.java.net/] [root at load0 /]$ mkdir /opt/dvm;cd /opt/dvm root at load0 dvm]$ unzip /home/jbuckley/dvm.zip [jbuckley at load0 ~]$ more /etc/release Solaris Nevada snv_45 SPARC Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. Use is subject to
2006 May 13
9
Is test driven development for newbies?
I''m still reading other people''s code and going over the books. As I was doing this a question sprang up in my mind. Is it wise for total newbies to attempt test driven development from the start? Basically, if you''re a newbie like me, chances are your tests might even be broken themselves. Or will attempting to write tests be good practice for actual coding as
2004 Aug 06
4
(was, streaming both ogg and mp3) now, sending out 3 streams
On Sun, 2003-11-23 at 00:35, Kerry Cox wrote: > Now I tried to add a third stream by adding the following <instance> to > the above config: > > <instance> > <hostname>xx.xxx.x.xxx</hostname> > <port>8000</port> > <password>secretpasswd</password> >
2006 Mar 04
29
Getting RJS / EgdeRails working
Hi, using Rails 1.0 on windows (without svn yet) I just wrote "rake freeze_edge". Are the RJS-templates already included then ? When I write "rake update_javascripts" I receive this error: svn: ''.'' is not a working copy Any tipps for a newbie on how to get the update done (if neccessary) ? thx Jan
2012 Nov 21
1
[JOBS] RoR Developer at SF Google-Backed Start Up
The Climate Corporation is a Google Ventures funded big data startup with a mission to help people adapt to climate change. We make sense of huge amounts of complicated data and run simulations <http://goo.gl/9Fv0J> to determine the risk of adverse weather, which influences 25% of GDP. We are looking for a Web Application Developer who are passionate about innovation and share the value