similar to: Isolating rails model specs from their implementation

Displaying 20 results from an estimated 100 matches similar to: "Isolating rails model specs from their implementation"

2007 Jan 22
1
Observed models cause failures with DRBSpec ?
Hi all ! I don''t believe I am the only one using model observers, right ? Well, here''s a nice one: $ drbspec spec . Finished in 0.125322 seconds 1 specification, 0 failures $ drbspec spec F 1) ''A user with an inactive and an active project should be able to return active projects only'' FAILED [] should == [#<Spec::Mocks::Mock:0xb75590bc
2007 Jan 21
35
Collection proxies need to be stubbed ?
Hi all ! I just started writing specs on a new project. I would just like to validate that this is the way you would write it. I know about mocks, stubs and expectations. I don''t think this is a problem for me. My question really boils down to: def index @projects = current_user.projects.active end My spec needs to return the proxy, no ? Here''s my code: context "A
2010 Feb 12
13
SSD and ZFS
Hi all, just after sending a message to sunmanagers I realized that my question should rather have gone here. So sunmanagers please excus ethe double post: I have inherited a X4140 (8 SAS slots) and have just setup the system with Solaris 10 09. I first setup the system on a mirrored pool over the first two disks pool: rpool state: ONLINE scrub: none requested config: NAME
2009 Jul 08
1
subsetting a dataframe with a string logical expression
Hi, I am trying to subset a dataset based on a filter defined by a user... I prompt the user for input.. resulting in a string logical expression ("X1 < 3"). I have tried using subset, but it is looking for a logical expression, not a character string. I keep getting the error: 'subset' must evaluate to logical. Example: x <- data.frame(matrix(1:15, nrow=5, ncol=3))
2012 Oct 30
1
pass javascript date variable to rails controller as params
I have an application where jquery fullcalendar is implemented. On day click I need to pass the selected date as params to rails controller. When I alert the date inside dayclick function, I am getting the date in the format of "Tue Oct 30 2012 12:40:20 GMT+0530 (IST)".. But when I pass as params in jquery ajax to rails controller, it is passing blank. How do I get it in rails
2006 Apr 11
2
OT: Polycom IP501 Config file error - Error is 0x4020 (during autoboot...)
Using FTP to configure 501. Gets past "Running... App = sip.ld" and: Welcome! Processing configuration... "This may take a few seconds." Then it displays: Config file error Error is 0x4020 and reboots continuously, repeating the above. Anyone seen this before? Is this a corrupt *.ld file? An FTP error? (PASV)? A missing SETUP setting? Thanks! -- Jim Rice by Design
2006 Apr 21
1
roundrobin strategy in queues not working as described?
I have set up an operator queue for our receptionist. That way, if she takes a break or is out, by logging out of the queue, calls to the "Operator" can be handled by other agents. I have set strategy = roundrobin in queues.conf. According to "the book" ATFoT, roundrobin always starts with the first agent in the queue. This is the desired result. I want all calls to start
2005 Sep 05
2
samba PDC -- really stuck here
Greetings, I am running RH9 I had the PDC running but it wants to use roaming profiles, which I don't really want, when I take out roaming profiles the none of the PCs can find the domain controller. I have posted my globals section here could someone please tell me what is wrong with it? [global] domain master = yes pam password change = Yes add user script =
2006 Feb 28
1
Rails page on Apple homepage
Apple Computer has put up a nice page on the Developer Connection entitled "Using Ruby on Rails for Web development with Mac OS X." http://developer.apple.com/tools/rubyonrails.html I guessed they have noticed David is helping the sales figures for MacBook Pros and Powerbooks. :) -- Posted via http://www.ruby-forum.com/.
2005 Apr 04
1
Netatalk ???
Hi, Is it from my eyes, or Centos (or for that matters, RHEL) doesn't include netatalk ???? If not, does it bring something else for the same porpous ? Any help would be appreciated. Warm regards, M?rio Gamito
2013 Sep 16
1
crond sometimes launches a child process?
Hi All. I monitor number of crond processes on my machines. On one of them I have 2 crond processes for a short period of time (few minutes) everyday. It is at the same time when one jobs starts to run - a sphinx indexer. What are the possible causes of crond running a child crond process? Best regards, Rafal.
2006 Feb 17
2
Packet vanishes after mangle-prerouting.
Can anyone tell me whether I have a routing problem, or an openVPN problem, or something else? I''ve stared at this for so long I think I must be looking in the wrong place! I have 3 machines: Machine A has single ethernet card, eth0, 192.168.5.5 Machine B has eth0, 192.168.5.? on the local net, eth1, 81.2.x.y to the internet, and
2006 Nov 22
1
aastra 480i configuration help
I'm having problems getting my aastra 480i to register with the asterisk server. I can inititate calls from the phone, but >sip show peers does not show any IP address registered for this phone. I am probably missing something stupidly simple. Anyone have an example config to share or corrections for my configuration? Asterisk 1.2 aastra 480i CT has the 1.4 firmware <sip.conf>
2006 Jan 01
3
Single Table inheitance doesn''t show subclasses ?
Hi, I am a Rails noob. Suppose you have: --- class Animal < ActiveRecord::Base end class Mammal < Animal end class Cow < Mammal end --- I provide Animal,Mammal and Cow controllers with the scaffolding, just to test and to fill up the Animal table. I can see the "type" column getting it''s value set with the class name. So far, soo good. Now, since listing Animals
2011 Jan 16
4
persistence by reachability
Hello guys, I have these models class Farmer < ActiveRecord::Base has_many :cows end class Cow < ActiveRecord::Base set_table_name :cows belongs_to :farmer end ... graph = Farmer.find(x) # Retrieves four cows of x graph.cows[1].name = "Trottolina" graph.save while adding a new cow to collection works perfectly fine, ActiveRecord doesn''t
2006 Jul 02
2
:include breaks has_many :order
It would appear that using :include on a model that has_many with an :order on another model makes it so that the order is ignored. Is this supposed to happen? Strikes me as odd behavior. For example class Farmer < ActiveRecord::Base has_many :cows, :order => ''position'' end class Cow < ActiveRecord::Base acts_as_list :scope => :farmer end If I do
2009 Mar 27
1
UTF8 postgres args saving issue
Hi, All I have an encountered an issue where the args field is not saved correctly to the database. I encounter an error like this: ActiveRecord::StatementInvalid (RuntimeError: ERROR C22021 M invalid byte sequence for encoding "UTF8": 0xcb3a H This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by
2006 Mar 08
12
best way to combine results from two tables
I want to combine a selection of data from two tables and display it as list. Note that this isn''t a join. i''m looking for something like this: Table 1: Sheep Name, Age, Farmer, etc. (sheep specific columns) Table 2: Cows: Name, Age, Farmer, etc. (cow specific columns) For my display I nneed something like this: Farmer Jone''s Livestock: TYPE NAME AGE Cow
2006 Feb 15
3
RailsTidy: validates your HTML
Hello everybody, I needed something to validates my HTML templates so I wrote a plugin and here is its first version: RailsTidy is a plugin for Ruby On Rails. It allows you to * validate your rhtml templates, * validate the html output of your functional tests, * clean the html generated by rails. For doing all this, it uses * Tidy[1], the popular HTML validator and
2008 Jan 17
6
Problems with sqlserver 2000 and ActiveRecord
Hi, I''m getting some trouble in connecting to a sql server 2000 database with ActiveRecord-2.0.1 and ruby 186-26, from win XP. Using the next conenction config: ActiveRecord::Base.establish_connection( :adapter => "sqlserver", :database => "nombre_bd", :username => "usu", :password => "contra" ) I have the next error: