similar to: rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered

Displaying 20 results from an estimated 900 matches similar to: "rspec-rails render_views doesn't render layouts? / how to check flash isn't rendered"

2011 Mar 06
2
render_views and render_to_string
Hey guys. One of my controller actions uses #render_to_string to send back a JSON response. When I try to spec this, Ruby raises a NoMethodError, saying that #render_to_string doesn''t exist in my controller action. Here''s the controller action, spec, and output: http://pastie.org/1640962 Any idea what I''m doing wrong? Thanks, Nick -------------- next part
2013 Nov 22
2
Cancan Rspec load_and_authorize_resource
Hello! While running bundle exec rake, I receive following error (see in attached file) However, my tests are steel passing with command rspec spec/controllers/ Some info: ads_controller.rb: class AdsController < ApplicationController load_and_authorize_resource except: :create end ads_controller_spec.rb: require ''spec_helper'' describe AdsController do render_views
2009 Aug 14
1
Embed R, and provide a function to user scripts
Hello, I'm not sure how to go about this. Suppose I have a function SEXP boo(SEXP x){ //do something } Also, I have an executable which embeds R in itself. I would like to provide a R function to user code to call that calls 'boo' e.g ##user supplied expression that is given to me x<-1 boo(x) One way is to create a library with function boo that performs .Call to boo, but is
2017 Oct 25
1
Finding the entry point function in a LLVM IR
Thank You David and Mats for the reply, The reason I need to know that main is the entry point is as follows : I have a dead code elimination pass that removes the function call for boo. boo was initially called from the main function , but since the return in the main function has no dependency on boo, boo function call is removed. Now I want to remove the function definition of the functions
2008 May 29
2
creating library
Hi, I'm able to create a library with R CMD INSTALL cmd, etc... I'm just wondering.. is it possible that when the user says library(boo), it runs some initialization code? I have a dumb R file that is: print(2) boo <- function(x){} when I R CMD INSTALL the library, I'm able to see 2 in my unix console.. but when I do library(boo) in R afterwards.. I don't see
2002 Dec 05
1
writing to gzfile: segmentation fault (PR#2347)
Full_Name: Vadim Ogranovich Version: Version 1.6.0 (2002-10-01) OS: Red Hat 7.1 Submission from: (NULL) (209.99.241.1) The following sequence of commands crashes my R session. The first weirdness happens after the second command that appears not to change the "foo.gz" file, no error generated. > con <- gzfile("foo.gz", open="w"); cat("goo\n",
2009 Jun 22
2
negation in grep
Does anybody know how to negate a string in a grep command, i.e., what I need is to return only strings that do NOT contain a second string anywhere in the entire string. for txt <- c("boo","goo","doob","foo","boofoo") I need a grep command that returns strings with "oo" except when "b" is present anywhere. I know that
2007 Feb 13
2
Matrix manipulation
Hi, let's say I have this A = matrix(c(1, 2, 4), nrow=1) colnames(A)=c("YOO1", "YOO2", "YOO3") # ie # YOO1 YOO2 YOO3 #[1,] 1 2 4 HELLO <- NULL HELLO$YOO1="BOO" HELLO$YOO2="BOO" HELLO$YOO3="HOO" and I want a matrix that will sum my categorization.. how can I do it efficiently without any loop? #ie BOO HOO
2008 Oct 16
1
apply, t-test and p-values
R 2.7.2 Windows XP I am using apply to compute a series of Student's t-test from two matrices, sample1 and sample2. boo<-apply(sample1,1,t.test,sample2) I want to pick of the p-values from the tests, but can't seem to get it to work. I have tried several methods to get the values including: boo<-apply(sample1,1,t.test$t.test,sample2) boo<-apply(sample1,1,t.test,sample2)$t.test
2011 May 27
14
[rails] undefined method `model_name' for NilClass:Class
Never seen the error above before, code: describe "edit action" do it "edit action should render edit template" do food = Food.create(:name=>''mooo'') # Food.any_instance.stubs(:valid?).returns(true) get :edit, :id => food.id response.should render_template(:edit) end end -------------- next part
2010 Jan 11
1
Problem with S4 generic function print
First, if I have an S4 class boo should I define S3 method for printing print.boo(..) or should I define S4 method print(..). I mainly need to define print function only because some user might call it and then I would like to dispatch the call to right function instead. Second, it seems that by defining S4 generic function print, it is possible to break argument hinting on the status bar.
2008 Mar 18
1
Merb and Javascript template system
I''ve tryed to use the same logic in html layouts to handle javascript files without success. All I need is not repeat javascript code in various erb templates that have 90% of identical code. - I can''t use more than 1 js file. - If isn''t a way to do this like erb can do in html, what''s the best way to "include" a file in another using Merb? -- from
2012 Aug 23
3
System will not boot - faulty fstab?
I believe that I made a boo boo recently when recovering some unused disk space. Without going into painfully embarrassing detail I need to delete an entry in fstab for a now non-existent logical volume. The system reports that the there is a bad superblock for said logical volume. Mainly I expect because there isn't one anymore. How do I edit fstab so as to remove the mount request? For
2001 Feb 17
1
More comments on R-1.2.1 builds (PR#852)
On IBM RS/6000 AIX 4.2, I built R-1.2.1 with % env CC=xlc CXX=xlC F77=f77 FC=f77 ./configure R is now configured for powerpc-ibm-aix4.2.1.0 Source directory: . Installation directory: /usr/local C compiler: c89 -g C++ compiler: xlC -g FORTRAN compiler: f77 -g X11 support: yes Gnome support: no Tcl/Tk
2011 Mar 21
1
Need help in "repairing" the booting of my Linux 4 server
As I shared on this forum last week, I did a bad boo boo when I erased my /boot/ directory without a backup - all of the things I caution other NOT to do. Nevertheless, after trying to put things back in order, today I decided to try a reboot and I get a GRUB prompt. Next I have put my Linux 4 disk in the CD drive and have selected the "linux repair" mode which has put me into the
2010 Sep 30
1
getting the output after bootstraping
Thanks to the help of people from this forum I was able to bootstrap my data and then apply a model to it. Thanks for all your help. Everything worked out well, but I am having a difficult time getting the new parameter values. I bootstrapped the data 300 times and I want to get the 300 sets of parameter estimates and plot them in Excel. Here is my code:
2003 Feb 11
2
Samba + LDAP = Misery
I have been working on this for weeks now and feel like I am at a dead-end. I am using Samba 3.0 (Head) and OpenLDAP (2.0) and smbldap-tools 0.7 and cannot join either a Linux machine or Windows 2000 machine to the domain. If any of you have some ideas they would be much appreciated. Highlights: - I have a root defined (UID and GID of 0). - Trying to join the domain will successfully add my
2006 Aug 03
6
create or update -
Hi everyone, I''m looking for a shortcut to finding and updating or creating record depending on the results of the find. So, is there a shorter way to do it than this? @stuff = Stuff.find_by_foo_and_bar("yay","hooray") if @stuff: Stuff.update(@stuff.id, {:foo => "boo", :bar => "hoo"}) else Stuff.create({:foo => "boo",
2006 Apr 21
3
Sorting Search results
I tried sorting the search results in Ferret::Index::Index#search and what I found was that the sort is applied not to the whole search but to the returned results. Suppose I have these results: Text - Num foo - 2 bar - 3 far - 4 boo - 1 If I limit the search to the first two and sort by num I get: foo - 2 bar - 3 while I think the natural behaviour would be: boo - 1 foo - 2 Is this
2003 Jan 24
3
LDAP Filter Problem
I was wondering if anyone could help me with this one. I am having trouble getting LDAP and samba working properly on my Debian Woody box. I am using OpenLDAP 2.0.27-3 and the unsable packaged Samba version 2.999+3.0 and am using the samba.schema for my LDAP database. Whenever I try to join the network using either W2K or smbclient the LDAP debug log shows that the following filter is being