similar to: Removing an AR class definition, for testing plugins

Displaying 20 results from an estimated 70 matches similar to: "Removing an AR class definition, for testing plugins"

2007 Nov 08
1
Running tests from another test case
I''m in the position that would be really useful for me to run in a testcase a test belonging to another testcase. Assuming I do not want to use modules, how could I do that? My code would be something like this: class MyTestCase < Test::Rails:TestCase def myTest matc = MyAnotherTestCase.new end end The code above seems to work but when I run MyTestCase all the tests
2008 Jun 19
0
Error loading fixtures with classes that set_table_name
Hi all, I just hit a big wall involving a legacy database. I''ve got an active record class called "School" that uses "set_table_name ''old_school''" to map to a legacy database table: class School < ActiveRecord::Base set_table_name ''old_school'' end It works great, until I''m testing and I want to use fixtures.
2008 Jun 23
0
Error loading fixtures for classes that set_table_name
Hi all, I just hit a big wall involving a legacy database. I''ve got an active record class called "School" that uses "set_table_name ''old_school''" to map to a legacy database table: class School < ActiveRecord::Base set_table_name ''old_school'' end It works great, until I''m testing and I want to use fixtures.
2009 Mar 19
6
[Cucumber 0.2] Failure to use should
I have a step definition like this: Then "the account should be created" do account = Account.find_by_name("my shiny new account") p account.class account.should_not be_blank end When running this step, I got the error message: Account(id: integer, name: string, state: string, next_renewal_at: date, created_at: datetime, updated_at: datetime, full_domain: string,
2008 Jun 07
3
Match render :nothing
Hello guys, Is there any way to match a render :nothing? I coudn''t find any way to do this so i''ve just changed my controllers to do a "head :ok", but it would be nice to know if there is any other way :) -- Maur?cio Linhares http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en) Jo?o Pessoa, PB, +55 83 8867-7208
2011 Jul 25
6
What does using a lambda in rspec tests accomplish?
Here is the code in question: describe UsersController do render_views … … describe "POST to ''create'' action" do describe "failure" do before(:each) do @attr = { :name => '''', :email => '''', :password => '''', :password_confirmation =>
2006 Jun 21
1
Plugin Panic! - no accessing a model''s class methods?
Hi plugin-authors. So this is a little bit of take two on this question, but why can''t I access a singleton on the model calling my plugin? The crux of the full plugin below is: #logger.info self.class.to_s new_copy = self.class.new( @copyable_attributes ) the logger spits out "Datatype", but I get an error from rails saying: undefined method `datatype'' for
2007 Aug 01
3
Test Rendering nothing in Rails
Hi In a controller I have method that is accessed via an AJAX call and will conditionally do: render :nothing => true to test the condition hitting this line I was hoping to do something like: response.should render_template(:nothing) How should I test this behaviour? Cheers Shane
2008 Nov 04
18
Can I do foo.should (be_nil || be_empty) in rspec
Is there any way to do foo.should (be_nil || be_empty) in rspec. Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20081104/ee43c9c9/attachment.html>
2008 Jun 20
15
before_save model callback rspec testing
hi all, i''m learning rspec and i can''t figure out how to test if a callback is executed in a model. my model code is: class User < ActiveRecord::Base before_save :encrypt_password ... def encrypt(password) self.class.encrypt(password, salt) end thanks a lot, cs. -- Posted via http://www.ruby-forum.com/.
2013 Aug 25
3
Time axis formatting.
Attached is a plot with a time series. If I have a time series object in R. How do I get the plot in the attached format of time axis?. When I issue plot(ts) I get a time series plot with tic only for years. -- with best regards Sudheer ********************************************************************************** Dr. Sudheer Joseph Scientist INDIAN NATIONAL CENTRE FOR OCEAN INFORMATION
2011 Dec 02
1
Willkommen bei der "R-help" Mailingliste
Hello everbody, I am new to this mailing list and hope to find some help. I'm trying to get into the spatstat package and encountered two problems. First a graphical one: There is an example dataset called "finpines" which has several marks (http://www.oga-lab.net/RGM2/func.php?rd_id=spatstat:finpines) When I pass the given code from the website to R data(finpines)
2009 May 20
1
combining xYplot with map
I'm using xYplot to create a bubble plot of values that I'd like to visualize on top of a filled-in map of the coast, but I'm too much of a lattice (which I understand xYplot is built on) and mapping newbie to figure out how to begin to make this happen. Below is some sample code that doesn't work but illustrates my goal. Any pointers anyone has would be much appreciated.
2006 May 23
1
shapes in rgl
Does anyone have a way of producing solid shapes other than spheres in rgl? I am using rgl to produce a simple visualisation of a forest model results using "lollipops". Its just a bit of fun, but as many of the trees are pines I would like to depict their crowns as cones. If there is a solution I need it to work under windows. Here is the example. library(rgl) library(misc3d)
2003 Jan 31
3
hist (PR#2512)
The command hist(c(2,2,2,4,5,6)) returns a histogram that looks incorrect -- 3 in the bin labeled 2 on the left, but 1 each in the bins labeled 3,4,5 on the left. Thanks! Pam Surko -------------------- > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor
2006 Jan 16
1
How to analysis Y98 chips using RankProd package?
Dear R and Bioconductor Helpers, I am using a package called RankProd under Bioconductor to analysis my Y98 (yeast) microarray data. I had no problem following the example in the vignette but got stocked when I tried to analyze my own data. When I tried to run the following command, RP.out <- RP(rrf.sub, rrf.cl.sub, gene.names = y98.gnames, rand = 123) I got the following response: Rank
2004 Sep 24
2
Case studies for 120 simultaneous calls on IVR
Hi, We?re going to build an IVR system with a TE405P and 4 E1. We?re sure that the 120 channels will be filled by 120 simultaneous calls during peak, so we want to have the good server to manage this. We wonder a lot of things and maybe you could help us. - Are you ever build a similar system ? - What hardware is the most adapted for this type of use ? - What is the most important ?
2006 Oct 16
11
Configuring a 3510 for ZFS
Hi folks, Myself and a colleague are currently involved in a prototyping exercise to evaluate ZFS against our current filesystem. We are looking at the best way to arrange the disks in a 3510 storage array. We have been testing with the 12 disks on the 3510 exported as "nraid" logical devices. We then configured a single ZFS pool on top of this, using two raid-z arrays. We are getting
2005 Jan 28
3
chan_iax2.c problem?
Hi, I was messing around with FireFly last night and got asterisk to crash hard. It looks like the bug is a division by zero in chan_iax2.c. I reproduced it and here are some infos I got from gdb: [Switching to Thread 245775 (LWP 23251)] 0x41154918 in calc_timestamp (p=0x816b710, ts=0, f=0x424eef24) at chan_iax2.c:2896 2896 int diff = ms % (f->samples / 8);
2012 Jan 26
2
R extracting regression coefficients from multiple regressions using lapply command
Hi, I have a question about running multiple in regressions in R and then storing the coefficients. I have a large dataset with several variables, one of which is a state variable, coded 1-50 for each state. I'd like to run a regression of 28 select variables on the remaining 27 variables of the dataset (there are 55 variables total), and specific for each state, ie run a regression of