similar to: people(:sam) should be saved to a @sam variable?

Displaying 20 results from an estimated 20000 matches similar to: "people(:sam) should be saved to a @sam variable?"

2007 Apr 01
7
database.yml: encoding: utf8 does not work
Hi all According to the Agile 2nd Ed book I added the line encoding: utf8 to my database.yml connections. But now when running rake I get plenty of errors: Character set ''utf-8'' is not a compiled character set and is not specified in the ''/usr/local/mysql/share/mysql/charsets/Index'' file What''s wrong here? I checked this Index file, but it seems to
2007 Feb 28
2
Fixture name not available as class variable in spec
Hi there, I can''t seem to access the fixture name as a class variable from my specs. I have to set the variable in the spec setup. ... [fixtures] my_fixture: id: 1 ... [rpsec] @my_fixture.id.should == 1 ... [error] You have a nil object when you didn''t expect it! The error occurred while evaluating nil.id ... [my setup] RSpec-0.7.5.1 (r1395) - BDD for Ruby Rails
2009 Dec 17
2
multiple usb apc smart ups with nut?
Hello everybody, I got tree UPS devices connected to a Debian server, and i am searching for a way to configure them. The server power-cord is only connected to one of the ups devices, and should monitor the other ups systems to sent email status. I got a HP R3000XR UPS with has a RS232 communication port that I have working perfectly. Then I have two APC SmartUPS 750V devices that are
2006 Jan 16
2
My first test - named fixture not autoloading instance variable
I''m trying to write a test like the one at the bottom of page 148 in Agile Rails. I''m using rails 1.0 I''ve created the fixture correctly I''m pretty sure because the test database table is being populated per the fixture. I have what I think is a simple unit test: ========= require File.dirname(__FILE__) + ''/../test_helper'' class CaseTest
2009 Oct 11
1
Problem with symlinks
Hi, currently I'm trying to extend my existing backup concept but I have issues due to symlinks. rsync has problems with symlinks. First some background information: I regularly back up my / and /home from my desktop PC and my netbook to my Synology DiskStation (500GB) using rsync 3.0.6 with this script: http://pastebin.com/m43d4e353 . This works without any error messages. On the DS
2006 Jan 18
15
Anyone got Globalize working???
Hi all In another thread I complain about an error I get after trying to get Globalize working. http://www.ruby-forum.com/topic/51988#new Now I want to ask you, if anybody of you has ever got Globalize working? I have done exactly what''s written in the (absolutely much too short) tutorial of its wiki... http://globalize.diluvia.net/wiki ...and I''m very frustrated that no
2011 Nov 12
1
With an example - Re: rbind.data.frame drops attributes for factor variables
When I use rbind() or rbind.data.frame() to add a row to an existing dataframe, it appears that attributes for the column of type "factor" are dropped. See the sample example below to reproduce the problem. Please suggest How I can fix this. Thanks, Sammy a=c("Male", "Male", "Female", "Male") b=c(1,2,3,4) c=c("great", "bad",
2006 May 09
2
load fixtures
I''m finally getting beyond using basic test fixtures, and a few questions have popped up. Has anyone found ways to do these? 1. Use a test fixture that is named differently from its table name? We''d like to have more than one possible fixture per table. (Or perhaps use test fixtures named similarly but in different directories.) 2. Load a test fixture for one test method only
2012 Feb 28
1
Alphanumeric DTMF !?
Hi list, What possibilities are there in asterisk to send an *alphanumeric DTMF*from/to asterisk !? Regards, Sammy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120228/e62e7890/attachment.htm>
2011 Nov 24
3
Is there way to add a new row to a data frame in a specific location
Is there easy way (without copying the existing rows to a temporary location and copying back) to add a new row to a specific index location in an existing data frame? Example df = data.frame( A= c('a','b','c'), B=c(1,2,3), C=(10,20,30)) newrow = c('X', 100, 200) I want to add the newrow as the second row to the data frame df Please suggest a solution that is
2005 Oct 28
2
Accessing fixture
I have a very simple problem. I can''t seem to access a the fixture by name I have a sites.yml with: simple_site: id: 1 name: demo description: A demo site created_on: 2005-10-25 00:00:00 updated_on: 2005-10-25 00:00:00 And I have a test class as: require File.dirname(__FILE__) + ''/../test_helper'' class SiteTest < Test::Unit::TestCase fixtures
2008 Jun 13
1
Output of silhouette (cluster package)
Dear R users, I am mailing you about the graphical output of silhouette (cluster package) From the example of silhouette in help(silhouette): > ar <- agnes(ruspini) > si3 <- silhouette(cutree(ar, k = 5), # k = 4 gave the same as pam() above + daisy(ruspini)) > plot(si3, nmax = 80, cex.names = 0.5) from which one may conclude that group 1 is composed by
2006 Jun 24
1
@version_control_book not available while testing - AWD book 1 page 148
In the page 148 of the AWD book it''s mentioned that the while testing @products and @version_control_book are automatically made available. That''s not the case with me. In my test environment I don''t get those two variables. I was wondering if anything has changed in Rails 1.1 because in the new edition of the book (AWD - edition 2) there is no mention of such
2005 Dec 23
6
Agile book - test error
Hi all, I get an error when testing the "store_controller_test.rb" The troublesome line is in the test below: def test_add_to_cart get :add_to_cart, :id => @version_control_book.id <<< cart = session[:cart] assert_equal @version_control_book.price, cart.total_price assert_redirected_to :action => ''display_cart'' follow_redirect
2006 Apr 26
3
Test fixture syntax
OK, I know I''m doing something bone-headed, but I can''t for the life of me figure it out. I''ve read the test fixtures Rdoc about eight dozen times, and it says (to me) that if I have a YAML fixture file, dogs.yml that looks like this: fido: id: 1 breed: Terrier fifi: id: 2 breed: Poodle Then I can include fixtures :dogs in my functional test, and
2007 Dec 01
10
Fixtures Cleanup
All, I''ve been playing a bit with some patches to make the fixture loading and management code a little bit easier to maintain. If I were to start chopping out features, how would you feel about losing: Fixture instantiation, Old school single-file fixtures, CSV fixtures, The ability to specify a subset of fixtures (everything''s always loaded instead), The ability to
2006 Mar 22
1
An easy one: Accessing fixture data in 1.0+
OK, we all know that Rails turned off instantiated fixtures by default in 1.0. That''s not a problem. However, what I''m now wondering is how to access the raw fixture data out of the YML file (as opposed to the database.) Mainly, for comparing my database results with my expected results in a DRY way. The book says if you have the command "fixtures :foo", that
2005 Dec 14
1
Problems with testing - error posting to other controller
Hi, I''m trying to test my ad_controller. In order to create an ad, the user has to be logged in, so I have written a login() that logs in a valid user and generates a session[:user_id], like: def login (login="bob", password="atest") post "user/login", :user => { :login => login, :password => password } assert_response 302 # redirect
2012 Feb 16
2
Asterisk && RTCP
Hello list, I need to know about Asterisk's friendly nature with RTCP. I've phones which support RTCP and they connect to the outer world via multiple carriers. In one of my recent packet traces I've observed that the caller initiated a call with rtcp string in SDP while for the same call dialling our from Asterisk to the carrier has no RTCP string in SDP ! Can anyone please tell why
2012 Feb 11
1
Asterisk perl AGI confusing variables
Hello all, I'm struck with a very strange problem today. I've an AGI with some code subroutine snippet as follows: sub enable_sbc($) { my $carrier = shift; my $tmp = substr($carrier,1); my $jkh = $tmp; $server_port = $ast_agi->get_variable("SIPPEER($jkh,port)"); $ser_ip = $ast_agi->get_variable("SIPPEER($tmp,ip)");