Displaying 20 results from an estimated 800 matches similar to: "printing/logging during tests"
2014 Apr 14
1
duplication regression (?)
Below is an example of output that changed as a result of r64970. I
did not see any NEWS item suggesting this change is expected.
Note that the example is contrived and I don't have a use case for it.
I stumbled across it when playing with recent changes in R relating to
duplication. Does the example use undefined syntax?
-----
fn1 <- function(mylist) {
fn1a <- function()
2005 Mar 09
9
Unit testing + instance variables
After *much* digging and playing around, I finally figured out how to
unit test instance variables that are created by actions. It was
more difficult than I expected. It seems like there should have been
a more straight forward way to do this. Can someone enlighten me? A
simplified and somewhat contrived example of what I am current doing:
Thanks.
Matt
>>
# My Controller of interest
2007 Apr 03
1
functional test, fixtures should load by myself ?
rails version: 1.2.3
ruby version: 1.8.5
----
functional test, fixtures should load by myself ?
class FooControllerTest::Test::Unit::TestCase
fixtures :foo, :bar
def setup
setup_with_fixtures # <--- must call this ?
end
end
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2002 Nov 21
2
[LLVMdev] DSnode type question
Dear LLVM,
When I use analyze to construct the DSGraph for the lists.c program in
test/Programs/SingleSource/Shootout directory. I found out the heap node
in the function test_list() all have type FOLDED:R. I was wondering why
it's not heapnode anymore? My pass need to use this type information to
determine whether a node is heap node. Is there any way I can know this is
a heap node in this
2002 Dec 02
1
[LLVMdev] DSnode type question
Hi, Chris,
I was wondering if you had a chance to look at this problem. Could
you let me know how to decide if this is a heap node in this case? It's
important because my code depends on this information.
Thanks,
Jerry
On Thu, 21 Nov 2002, Chris Lattner wrote:
> > When I use analyze to construct the DSGraph for the lists.c program in
> > test/Programs/SingleSource/Shootout
2006 May 18
4
WebServices and DateTime - 3 elements of civil date are necessary
I simply trying to receive an array of objects, retrieved by
ActiveRecord from table with datetime column and I have:
test_list(SoapControllerApiTest):
ArgumentError: 3 elements of civil date are necessary
/usr/lib/ruby/1.8/date.rb:1214:in `new_with_hash''
/usr/lib/ruby/1.8/date.rb:1258:in `parse''
....
It''s a bug or I am wrong somewhere?
2007 Sep 27
1
rspec_on_rails: controller method not getting called
In my rspec_on_rails controlle rspec, I have this:
require File.dirname(__FILE__) + ''/../spec_helper''
describe FooController, "with a foo" do
it "should be false" do
get ''index''
assigns[:foo].should be_false
end
end
In my controller I have this:
class FooController < ApplicationController
def index
@foo = FALSE
end
2006 Feb 11
5
acts_as_taggable : plugin vs gem
Googling for acts_as_taggable is a little confusing: gem, plugin?!
What are the differences?
Which one to choose?
Where is the best doc?
Alain
2005 Dec 16
13
How to pass a collection to paginate?
There must be a better way to write this code:
@project_pages, @projects= paginate :project,
:per_page => 10,
:conditions => ["account_id = ?", account]
?!
If only I could pass the sub-collection
account = ...
@projects = account.project
to paginate, instead of letting it extract it with a find :all + sql
conditions
Alain.
--
Posted via
2006 Apr 29
1
reloading include-modules inside controller not working
Hi guys,
I would expect an ActionController-derived class to reload _completely_ in
development mode.
class FooController < ApplicationController
include FancyStuffSupport
def index
# bla
end
# more actions here
end
However, the ''FancyStuffSupport'' is not reloaded, only the ''FooController''
itself. Can this behaviour be changed? I feel back
2007 Aug 04
5
reusable specs - almost there
I have a lot of controllers with virtually identical functionality for most
actions. I''ve been using shared behaviours to DRY things up a bit, but I
still have to create separate behaviours for each context before I can use
the shared behaviours
what I have now is a generic file which contains all the behaviours and
examples common to all the controllers, and that file gets loaded from
2006 Feb 10
3
sorting <a href..> with D&D follows the link (browser thinks I click)
Hi all,
I''ve just added d&d sorting to a list where each item is a link_to ..
Problem: when I drop an item to its new location, the browser think I
clicked, and follows the link.
Any idea?
TIA.
Alain
2006 Feb 03
4
(BUG in svn/trunk?) - superclass mismatch for any subclass of ApplicationController
I track svn/trunk of Rails using svn:externals
Some change to Rails committed in the last 1-2 days broke my subclass
of ApplicationController
The example, below, works with Rails 1.0, but in today''s svn, it dies
with the following error:
"superclass mismatch for class FooController"
class ApplicationController < ActionController::Base
end
class FooController <
2006 May 25
6
150 Rails Plugins
The Rails Plugin Directory now has over 150 plugins and RDoc support
too: http://www.bencurtis.com/archives/2006/05/150-rails-plugins/
--
Benjamin Curtis
http://www.bencurtis.com/
http://www.tesly.com/ -- Collaborative test case management
http://www.agilewebdevelopment.com/ -- Resources for the Rails community
2005 Dec 15
5
initialize called more than once?
Hi,
In my test case below, it seems that ''initialize'' is called everytime
''hello'' is called. Is this by design, a bug, or my pilot error?
class FooController < ApplicationController
def initialize
print "\n initialize \n"
end
def hello
print "\n hello \n"
end
end
I
2008 Apr 29
1
Spec''ing controller macros
Hi,
(This is my first post after months of appreciative lurking...)
I''m trying to spec the following conditional controller macro:
class ApplicationController < ActionController::Base
# turn off session management for robots
session :off, :if => lambda {|req| req.user_agent =~ /(Google|Slurp)/i }
# ...
end
My current attempt seems to be quite unsuccessful:
1) when I
2006 Mar 09
4
Stop users accessing methods.
Hello all.
Is there a way to stop users from being able to access a controllers
methods without affecting the ability of other controllers to use them?
i.e
FooController
def secret
#Stuff
end
end
BarController
def index
redirect_to :controller => ''foo'', action => ''secret'', :id => ''007''
end
end
But directly
2006 Feb 25
5
Setting character encoding - do I do it with Rails or lighttpd?
I have a page which validates "tentatively," because the validator
uses the default character encoding. None was specified apparently,
so it falls back to UTF-8. How and where do I specify the character
encoding?
Pat
2010 Sep 06
2
dataframe row names from list
Hi,
I have a list which looks like this...
> str(y)
List of 10
$ : chr [1:4] "ABCD" "5" "0" "1"
$ : chr [1:4] "DEF" "15" "1" "16"
$ : chr [1:4] "AAA" "2" "17" "8"
$ : chr [1:4] "SSS" "15" "25" "1"
$ : chr [1:4] "III"
2006 Feb 05
26
Ruby on Rails and other sites use PHP?
I can''t think of a good reason, other than it''s legacy code which hasn''t
gotten around to being changed to RoR.
http://rubyonrails.org/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://37signals.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://basecamphq.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42
http://backpackit.com/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42