Displaying 20 results from an estimated 800 matches similar to: "[PATCH] TestResponseBehavior#binary_content calls block improperly"
2008 Jan 12
0
Can't test application controller methods in functional tests?
I have two methods in application controller that I want to test from
ForumController:
-----------------------
class ApplicationController < ActionController::Base
...
def logout
session[:username] = nil
session[:admin] = nil
redirect_to(request.request_uri)
end
...
def home
redirect_to(:controller => ''forum'', :action =>
2006 Jul 24
1
All functional tests fail with RoutingError
All,
I''m using InstantRails 1.0 on Windows XP and all my functional
(controller) tests fail with ActionController::RoutingError, although
the actions work OK through a web server/browser. Here''s an example of
an error:
1) Error:
test_create(AdminControllerTest):
ActionController::RoutingError: No url can be generated for the hash
{:controlle
r=>"admin",
2007 Jun 07
0
Functional Tests Fail - No URL can be generated for hash
Hi,
I''m just learning Ruby and Rails. I have developed a Rails application,
but not using the creation scripts that come with the rails
distribution. Consequently, no test scaffolding is available to me, and
I''m trying to write my functional tests from scratch.
I have what might be considered a standard plain old controller
(dashboard_controller.rb) that I''m trying
2005 Oct 10
1
ActionPack tests are failing
Hi,
i''m currently looking into a problem with the tests for ActionPack. 127
of them are failing on my windows machine. On Linux everything is
working fine so far. I just wasted a good part of an hour trying to find
the problem on windows...the solution is: Nitro and not Windows.
I''m using Edge Rails and have no rails gem installed. On Windows I have
the Nitro/Glue/Og gems
2007 Oct 04
1
PUT- or POST-ing xml
I''d like to write a test of a REST service wherein XML is submitted as the
request entity.
In Test::Unit on Rails, this seems to be possible in an integration test,
but not in a functional test. RSpec uses the Rails functional test
framework, as far as I can tell, so it suffers the same result; it tries to
symbolize the keys of the ''parameters'' hash, except the
2006 Apr 27
1
Ferret crashing Ruby
I''ve gotten several problems with C ferret crashing ruby. Here''s the
stack trace of my latest case:
#0 0x00000050 in ?? ()
#1 0xb74028ab in iw_close (iw=0x8685a40) at index_rw.c:947
#2 0xb7414359 in index_destroy (self=0x829ebc0) at ind.c:89
#3 0xb73f00bc in frt_ind_free (p=0x829ebc0) at r_search.c:1564
#4 0xb7f04dca in rb_gc_call_finalizer_at_exit ()
from
2006 May 09
1
name_url in tests
Hi there,
I posted earlier asking about testing named routes in functional tests, but got no response, so I''m making my question less specific.
It seems from the docs that it''s possible to to test named routes in cases such as:
asserts_redirect_to name_url(:param => "whatever")
but I haven''t seen any mention of it being used with any other tests and I keep
2006 Mar 01
1
assigns() method disappeared from test_process.rb
I just noticed that the assigns() method has been dropped from
action_controller/test_process.rb
(http://dev.rubyonrails.org/changeset/3724). Was this an oversight or
is there a new process for working with controller instance variables?
--
* J *
~
2006 May 08
0
testing named routes
Hello,
I''m trying to test routes named within a map.with_options statement.
I have in routes.rb:
map.with_options :controller => ''films'' do |f|
f.overviews ''films/:index'', :action => ''index'', :requirements => { :index => /index(artist|date|title)\.html/ }, :index => ''new''
etc...
end
and
2006 Feb 01
3
Testing components
I''m using template components to modularize an application I''m working
on and am really happy with the way it''s going. Unfortunately, all my
attempts at writing functional tests for them fail. Trying to duplicate
my normal controller tests I have:
require File.dirname(__FILE__) + ''/../test_helper''
require File.dirname(__FILE__) +
2007 Feb 05
0
How do I use a RESTful helper with path_prefix?
Once upon a time I had this in my routes.rb:
map.client_home '':client/'', :controller => ''orders'', :action =>
''new''
All orders must be scoped within a client name, so this worked quite
well. I used a before_filter to scoop up the @client object by doing
a find_by_name.
Then I decided to expose the OrderController as a fully restful
2005 Feb 08
2
test_process.rb => LoadError
Line 4 and following of test_process.rb reads:
if defined?(RAILS_ROOT)
# Temporary hack for getting functional tests in Rails running under
1.8.2
class Object #:nodoc:
alias_method :require_without_load_path_reloading, :require
def require(file_name)
begin
require_without_load_path_reloading(file_name)
rescue Object => e
2014 May 14
1
Bug in read.dcf(all = TRUE)?
Hi,
read.dcf() can modify the locale variable LC_CTYPE, and here is a
minimal example:
> Sys.getlocale('LC_CTYPE')
[1] "en_US.UTF-8"
> read.dcf(textConnection('a: b'), all = TRUE)
a
1 b
> Sys.getlocale('LC_CTYPE')
[1] "C"
After diagnosing the problem, it seems the on.exit() call in
read.dcf() is the culprit:
2017 Oct 02
1
relaunching libguestfs with the same overlay
On Mon, Oct 02, 2017 at 11:50:42AM +0300, Maxim Kozover wrote:
> Hi Richard!
> Could you tell me, please, if there is a way to relaunch libguestfs with
> the same overlay from the last run? The documentation tells the overlay is
> removed when the handle to libguestfs is closed.
Right, the overlay is created by libguestfs itself and thrown away
when the handle is closed:
2013 Jul 11
0
[LLVMdev] [PATCH] x86: disambiguate unqualified btr, bts
http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/arch/x86/include/asm/bitops.h#L68
Here is one example that I found. Are the inline assembly arguments
ambiguous in size?
-Jevin
Sent from my mobile device. Typos are par for the course.
On Jul 10, 2013, at 5:47 PM, Jim Grosbach <grosbach at apple.com> wrote:
On Jul 10, 2013, at 2:30 PM, Eric Christopher <echristo at
2007 Jul 15
3
rejected form not handled
Hello,
I have a login form on /login.php which POSTs to /dorf1.php when access is
granted and to /login.php when it is denied.
require ''rubygems''
require ''mechanize''
agent = WWW:Mechanize.new()
login = agent.get("http://server/login.php")
form = login.forms.action("dorf1.php")
form.fields[2].value = "wronguser" # login
2006 Sep 18
2
BUG: Possible issue with escaped hrefs
I noticed an interesting problem today when scripting against a web
app. The application contained a link in it that used %20 instead of
spaces. After running mechanize through the Charles debugging proxy
I found that mechanize was converting %20 to %2520 (double escaping
the %20).
This appears to happen under both 0.5.4 and 0.6.0.
Here''s a simple set of files that demonstrate
2006 Aug 07
3
Monitoring Rails apps?
I just had an interesting meeting with developers from other parts of
my company. One of the things they said they really liked about Java-
based solutions was the availability of sys-admin tools to monitor
Java (probably J2EE) applications.
Nothing comes to mind in the RoR camp to cover this. I''m sure there
are plenty of generic tools for watching pings and log files, but is
2006 Aug 01
8
Dumb views?
Hello again! I''ve another "what would you do in this situation" question.
You''ve got 6 controllers, one named base. The other 5 controllers extend
base. Currently they share one layout.
Your layout displays navigation. However, there are two actions inside base
for which you do not want navigation displayed (index, new).
Do you...
a) Add logic to your layout telling
2006 Jul 31
17
Ruby on Snails
I''ve been reading, hearing, and looking at blogs that state Ruby on
Rails is rather slow. Coming from a VB 6 world (thank you Microsoft for
killing VB because VB.NET is NOT VB) I was always told that VB was a toy
or too slow. Now, I''ll easily tell you that yes VB was not a great
language. It had it''s share of warts, like a lot of other languages I
might add, but