Displaying 20 results from an estimated 20000 matches similar to: "Some specs"
2006 Jul 24
6
Mocking causes empty specification blocks
I''ve found myself mocking out a published api in my set-up method.
This has led to some contexts having a large set-up and empty
specifications. As the mocks get auto-verified, the specification
blocks have nothing to do but serve as documentation. Does this sound
bad?
Chris
2006 Sep 25
3
Problem stubbing instances referred to by constants
Hi James,
An instance retains its mocha between tests if that instance is
pointed to by a constant. The simplest failing test is something like
(add as a new file in mocha/test)..
#--code--
require File.join(File.dirname(__FILE__), "test_helper")
require ''stubba''
class WemStubbaTest < Test::Unit::TestCase
Arr = [1, 2, 3]
def test_a
2009 Jan 23
1
Validation levels
Sometimes I want to show just one error, even when a field fails two or
three validations.
A custom validation method is easy enough, but the helpers are nice and
concise.
So, has anyone found a way of doing this with AR''s validation helpers?
The :if/:unless look promising, but its made harder by validations being
applied in a random order.
- Andy
P.s. The validatable gem has the
2003 Sep 25
1
Diamond graphs, again.
Some time ago I was allowed to discuss "Diamond Graphs", and whether
they would be useful in R, in this mailing list.
The August 2003 issue of The American Statistician has finally arrived
here and I have been able to read the article. A number of points of
interest arise.
1. The article is
"A Diamond-Shaped Equiponderant Graphical Display of the
Effects of Two
2006 Nov 21
0
[745] trunk/wxruby2/doc/textile/choice.txtl: Correct ruby method signature for constructor, bit more explanatory text
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding:
2006 Jul 31
1
Textmate command to display specifications
I''ve added a command that displays the html formatted output of some
specifications. It''s as simple as..
#!/bin/sh
/usr/bin/env spec $TM_FILEPATH -fhtml
I''m wondering if anyone has anything more sophisticated (although to
be fair, this does the job for now)? I''ve seen some posts about a
rspec on rails textmate command but haven''t taken a look at it
2006 Jul 24
2
Creating a ''default'' mock
Am I correct in thinking that it''s not currently possible to have a
method that creates a ''standard'' mock (i.e. a mock that has defaults
useful in all contexts)?
I''ve tried with the mock method and also by manually creating new Mock
instances. I get failures when setting up expectations (undefined
method ''receive'' for proc).
Chris
2007 Feb 23
2
Deferred success for specs?
I''ve started using specs as a to-do list. I write explicitly
violated specs so I know what to come back to. But a lot of the
time, that means if I start to work on another piece of functionality
covered by the same spec, it''s hard to tell what I''m working on now
from the explicit failues.
I run all my specs through TextMate to use the HTML output, so I go
by
2006 Aug 14
2
Plugins: Validation Reflection and Client-Side Validation
I''ve just put two plugins on RubyForge. Included below are the READMEs.
You can get the plugins at
svn://rubyforge.org//var/svn/valirefl/validation_reflection/trunk
svn://rubyforge.org//var/svn/clientsidevali/client_side_validation/trunk
Michael
Validation Reflection
=====================
Version 0.2, 2006-08-06
This plugin adds reflective access to validations
-
2006 Oct 26
3
reply-to address of this list
Could one of the admins maybe specify the reply-to address for this
mailing list? It''s frustrating to realise you''ve just sent a message
to an individual, having meant to send to list.
Chris
2007 May 05
10
have_one and have_present
>Comment By: Luis Lavena (luislavena)
> Date: 2007-05-04 23:37
> describe "An Asset" do
> before(:each) do
> @asset = Asset.new
> end
>
> it { @asset.should have_one(:attachment) }
> it { @asset.should have_present(:something) }
> end
Food for thought on these. I like have_one a lot. It speaks to me as a
Rails developer and I think it speaks to
2011 Aug 03
2
How to test modules and custom validators
I''m trying to have most of the important stuff tested and in order to do
that I run in front of some stuff I''m not quite sure which is the best way
to test them.
At this time I am having question around how to test modules and the custom
validators (the typical email format validator for example).
To test a module the best I saw up to now was finded here:
2009 Sep 14
1
How to extract partial predictions, package mgcv
Dear package mgcv users,
I am using package mgcv to describe presence of a migratory bird species as
a function of several variables, including year, day number (i.e.
day-of-the-year), duration of survey, latitude and longitude. Thus, the
"global model" is:
global_model<-gam(present ~ as.factor(year) + s(dayno, k=5) + s(duration,
k=5) + s(x, k=5) + s(y, k=5), family =
2004 May 15
1
Again some questions about multilevelanalysis
Dear list,
I asked some questions about multilevelanalysis a couple of months ago. In the
meantime I did some reading about the subject. Now I'd like to check, if I
understood it all correctly. If you think my questions are not appropriate
for this list, please tell me so and i will immediatly stop asking them.
I have a dataset with one predicted variable (y), two explanatory variables
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
2004 Feb 24
1
Tweaks for 0.2
I can make these changes tonight, but if somebody else could do it that
would be swell too.
1) Validators currently do not work for the dumbest reason ever... the
"Clone" method in wxRbValidator needs to be changed to:
virtual wxObject* Clone() const;
while in there, I think the validator methods need to be renamed to
proper ''wxruby'' things ("validate"
2006 May 09
0
[PATCH] build: make linux download more flexible
Hi,
Here is an updated version of this patch for xen-unstable.hg 9960.
Please consider it for inclusion.
--
Horms http://www.vergenet.net/~horms/
build: make linux download more flexible
* Allow LINUX_REPO to specify the URL of the repository for the linux kernel,
- Defaults is: http://www.kernel.org/pub/linux/kernel/
* Allow LINUX_REPO to be
2008 Nov 25
4
glm or transformation of the response?
Dear all,
For an introductory course on glm?s I would like to create an example to show the difference between
glm and transformation of the response. For this, I tried to create a dataset where the variance
increases with the mean (as is the case in many ecological datasets):
poissondata=data.frame(
response=rpois(40,1:40),
explanatory=1:40)
attach(poissondata)
However, I have run into
2004 Aug 06
3
ICE/1.0 specs
I'm looking for specifications of the ICE/1.0 protocol. Not everything
could be derived from the source code of the icecast 2.0 server.
Which headers (ice-tags) have to be sent to the server, which are
optional?
What are possible responses of the server?
Does the client have to wait for a response?
Does the server have to send a response?
<p>Please help to make the ICE/1.0 clients
2008 Jul 08
0
forecast & xreg
Dear all,
I am fitting an arimax (arima with some extra explanatory variables)
model to a time series. Say, I have a Y (dependent variable) and an X
(explanatory).
Y is 100 observations (time series) and X is 100 + 20 (20 to use for the
forecast horizon).
I can not make xreg work with the forecast function for an arima fit.
The "predict" function seems to be working but the