similar to: Help with spec controller

Displaying 20 results from an estimated 1000 matches similar to: "Help with spec controller"

2007 May 29
5
Trouble defining a stub method for a controller
Hello, Not sure if I am doing something really wrong (let''s not say stupid for now), but I haven''t been able to stub a controller method like: controller.stub!(:logged_in?).and_return(true) Please help, this is driving me nuts ;-) -- An?bal Rojas http://www.rubycorner.com http://www.hasmanydevelopers.com
2007 Aug 06
5
Problems with array mock
Hi everyone, I''m trying this in my helper spec and it didn''t work: @curr_odontogram.should_receive(''photos[1]'').and_return(@photo) and the error is: SyntaxError in ''PersonHelper Deberia devolverme un link para eliminar una foto'' compile error /home/gramos/src/rails/r-dental/config/../vendor/plugins/rspec/lib/spec/mocks/proxy.rb:99: syntax
2007 Jun 07
6
Problem with response.should render_template
Hello, I have problems with this spec controllers: http://pastie.caboo.se/68634 when I run: rake spec:controllers I get this error: ...............F...... 1) ''DocTypeController should update and redirect to show'' FAILED expected redirect to {:action=>"show", :id=>1}, got redirect to
2008 Jun 06
2
Problems with view spec and mocking will_paginate
Hi all, I have some failures that not I don''t understand this the pastie with index.erb.html http://pastie.org/private/zgohh6dcts04wpfagfgz5q and this is the pastie for view''s spec: http://pastie.org/210485 and the failure: 1) ActionView::TemplateError in ''/posts/index.html.erb should render list of posts'' undefined method `count'' for
2008 Jun 10
1
Refactoring''s code needs refactoring''s specs?
Hi guys, I have one question: When refactoring the working code I need or should refactoring the specs too? My old code is: http://pastie.org/private/gpskgtavm4yzutanq1ro3w My new refactored code: http://pastie.org/private/2emgi1hr5iga3m9jib4q and the specs that are still passing without refactoring: http://pastie.org/private/qn3uaoin0k2n8vjsusssg Regards. -- "Most of you are
2011 Sep 18
2
R-Help
Hi, my name is Gastón. I just read a question, made by Walter Durka, about a nonparametric discriminant analysis. It wasn´t any answer, and I was wondering if at this moment there is one. I have the same problem as W. Durka. I´m trying to classify and to cross-validate samples of three tunicates species based on morphometric data and to identify the variables that best discriminate between
2008 May 23
2
Some problems with Sweave
Dear R users, I'm working in a brief R-tutorial to a group of students. To make that I'm using Sweave but I've got two problems: First, I want show how R operates with the matrix type but, I write in the .rnw document the code <<echo=T,results=tex>>= matriz <- matrix(vector,nrow=3,ncol=6) matriz @ and after compilating the LaTex document I obtain in the pdf the next
2002 Jul 12
2
Lattice help (again?)
I appologize if this post is a duplicate, but I did not get my first post myself.. Here is my original post: --------------------------------- Hi all, I've got some troubles with a Lattice plot. The error I get is Error in Ops.factor(groups[subscripts], vals[i]) : Level sets of factors are different which sort of doesn't make sense to me. Can you please help me figure out what
2007 May 25
2
Switch back to mount after fallback
Hi Geoff, Geoff Shang wrote: > Hi, > > That's what fallback-override is meant to do. Are you saying that it's not > working for you? Not working. But what is wrong? I've added the second mount to icecast.xml and tested whether it switch back to the original mount point. The mount part of icecast.xml: <mount>
2007 May 25
2
Switch back to mount after fallback
Hello icecast user, That's my first post to this list, because everything works fine :) But now I'm missing a feature and I'm not sure if it is possible to realise. I have two mounts. Only one defined in the configuration: <mount> <mount-name>/gast.ogg</mount-name> <fallback-mount>/offline.ogg</fallback-mount>
2020 Apr 17
3
Convertir lista de precios a dolares por gramo
Se ha borrado un adjunto en formato HTML... URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20200417/11369880/attachment.html>
2009 Sep 05
1
Windows Users cannot change password on PDC Samba Server
I've this problems. I'm using on my smb.conf # Sincronizacion de cuentas LDAP, NT y LM # unix password sync = Yes ldap passwd sync = Yes passwd program = /usr/sbin/smbldap-passwd -u "%u" passwd chat = "Changing *\nNew password*" %n\n "*Retype new password*" %n\n" [2009/09/03 14:05:16, 1] smbd/chgpasswd.c:change_oem_password(1057) Sep 3 14:05:16
2007 Aug 17
11
[rspec] looking for a simple refresher
I''ve been off the rspec for a few months and I''m trying to get back on it. 1) Spec::Mocks::MockExpectationError in ''TicketsController handling POST /tickets should create a new ticket'' Mock ''Ticket_1001'' expected :new with ({}) once, but received it 0 times ./spec/controllers/tickets_controller_spec.rb:16: script/spec:4: class
2007 Sep 30
9
Problems with testing nested routes using mocking
Hello forum I have there to files #----- virtual_host_controller.rb class VirtualHostsController < ApplicationController before_filter :capture_domain # GET /domain/1/virtual_hosts/1 def show @virtual_host = @domain.virtual_hosts.find(params[:id]) respond_to do |format| format.html # show.rhtml end end private def capture_domain if
2008 Jun 04
5
controller filters running twice in 1.1.4?
since upgrading to 1.1.4 (I had been running without issue on a git snapshot), I''m noticing that my filter actions initiated from application.rb seem to be running twice. I created a test rails project with the rspec scaffold and am also seeing the same behavior here too. Adding this code to application.rb: before_filter :foo def foo "foo" end and an example
2020 Feb 25
2
PJSIP crashes
PJISP cannot handle the From field when it does not contain a number. Can this be fixed? [Feb 25 12:35:43] ERROR[7143]: pjproject: <?>: sip_transport.c Error processing 400 bytes packet from UDP 8.38.43.67:5060 : PJSIP syntax error exception when parsing 'From' header on line 4 col 40: CANCEL sip:14408785990 at 162.255.138.102:5060 SIP/2.0 Via: SIP/2.0/UDP
2007 Jun 28
1
Error en assign(mname, def, where)
Hi R users, I am working with the fda package but when I call the function pca.fd I obtain a message error, which I cann't identify. The error say That : error in assihn(mname,def,where), is not possible to add links to a blockade enviroment. The orther that I'm writting is: > cp1 <- pca.fd(ind.fd1,nharm=3) and before it I can to plot the functional data object ind.fd1. ?Have
2006 Jun 29
6
Naming Convention for Controllers?
Hello! I just read DHH''s presentation pdf. In his examples, he wrote PeopleController instead of PersonController. I''ve been using singular words in controller''s name. Which is more common? Thanks. Sam -- Posted via http://www.ruby-forum.com/.
2007 Dec 04
10
Unexpected message on :attr_accessor
This may be a dumb noob issue, but I haven''t found any answers while seaching the forum-- I have a controller method def edit @user = User.find params[:id] @user.password_confirmation = @user.password end The User class has an "attr_accessor :password_confirmation" definition (so "password_confirmation" doesn''t exist in the users table). My spec
2006 Mar 30
2
acts_as_ordered plugin
Hey all, I''ve just put together a little plugin to easily access the neighbours of a given model in a particular order. Read on if interested. Install: script/plugin install http://svn.viney.net.nz/things/rails/plugins/acts_as_ordered Usage: class Person < ActiveRecord::Base acts_as_ordered :order => ''first_name'' end Say you have people with first