Displaying 20 results from an estimated 300 matches similar to: "ActionPack tests are failing"
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 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 Dec 04
5
ruby on rails ecommerce tests are failing, but why?
i am working through the Beginning Ruby on Rails Ecommerce book and on
page 101 where it is talking about integration tests, i run
test/integration/book_test.rb and it fails giving me the following
error message:
1) Failure:
test_book_administration(BookTest)
[test/integration/book_test.rb:45:in `add_book''
test/integration/book_test.rb:11:in `test_book_administration''
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
2007 Mar 19
3
Assert_select
Hi all
This is my first post here. I ave been using Rails for a couple of
months, and am starting to put together a test suite. But I''m having a
problem with assert_select in my functional tests.
According to the documentation, it should be fine with two arguments -
a CSS selector and a string to test it against. But no matter what I
do I keep getting the exception:
wrong number of
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
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 *
~
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 =>
2008 Dec 01
1
Undefined method "full_description" when trying to run "rake spec"
Hello guys,
I''m getting this weird error when trying to run the specs using "rake spec":
/home/mauricio/NetBeansProjects/talkies/vendor/rails/actionpack/lib/action_controller/test_process.rb:471:in
`method_missing'': undefined method `full_description'' for
#<Spec::Rails::Example::ControllerExampleGroup::Subclass_73::Subclass_9:0x7f5fdca4a810>
2006 Apr 22
5
selenium plugin not working with rails 1.1
Hi,
I really like selenium, and I just tried the plugin created Jonas
Bengtsson. However I cannot get it to run on rails 1.1 and coundn''t find
anyone complaining about it?
Did anyone get it to run on rails 1.1.2?
Greets,
Abdur-Rahman
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
2007 Nov 17
0
rake errors
Folks,
I have a rake task that runs via cron and calls a controller action. I
was getting the ''config/boot.rb:28:Warning: require_gem is obsolete''
warning, so I ran rake update:rails. Now I''m getting a whole bunch of
errors and the rake task bombs. The traceback on the errors doesn''t
seem to make much sense to me. Help?
rake task...
require
2006 May 05
3
posting xml in functional test
Hello,
I''m trying to write a functional test for a simple CRUD controller which
accepts / emits xml in a REST- like fashion. However the following code
won''t work for me - an exception is generated
def test_create
post :create, ''<person><name>john</name></person>'',
2008 Feb 05
1
Functional Test has error when testing controller updates_attribute of its parrent.
I am working in Rails 2.0 and I have the following functional test.
class VotesControllerTest < ActionController::TestCase
def test_should_create_vote
assert_difference(''Vote.count'') do
post :create, {:vote => {:vote_value => 5,
:user_id => users(:nick).id,
:entry_id =>
2008 Dec 03
5
How to test a plugin
Guys,
I''ve created a plugin, i wanna put my automated test there.
However, I got bad file descriptor error when i run the test like normal
unit test file:
"ruby plugins/acts_as_fox/test/acts_as_fox_test.rb"
How to test a plugin?
Also, is it right to say that I should only put my unit tests (but not
functional test for example) for the plugin in the plugin test folder?
2005 Feb 09
1
[DEFECT] ''validates_inclusion_of'' not working as expected (couldn''t post to Trac as it gave me an error)
Hello,
I tried to post this as a bug on the trac site, but whenever I hit
submit, I got the error message:
---
Precondition Failed
The precondition on the request for the URL /newticket evaluated to false.
---
Anyway...
Let''s say I have the following model classes:
---
class Project < ActiveRecord::Base
has_many :tasks
end
class Task < ActiveRecord::Base
belongs_to
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