search for: test_index

Displaying 20 results from an estimated 21 matches for "test_index".

2006 Feb 27
1
Functional test problem with environments variables
...d => ''123''} it works in the controller and when i run the application, i managed to get the values out from the development.rb by using some statements like @user = [''USER_DETAILS''].name. But when i code the functional test, even the most simple test like test_index in user_controller_test, it failed and result in this error : NameError: uninitialized constant USER_DETAILS inside the test_index is like this: class UserControllerTest < Test::Unit::TestCase def setup @user = User.new end def test_index get :index assert_response :success...
2006 Jul 02
5
"the number of parameters does not match the number of substitutions" error
All of a sudden, I''m getting this error: 1) Error: test_index(AccountControllerTest): RuntimeError: The number of parameters does not match the number of substitutions. /home/joe/projects/tanga/trunk/config/../vendor/rails/actionpack/lib/action_controller/assertions.rb:92:in `assert_redirected_to'' /home/joe/projects/tanga/trunk/config/../vend...
2006 Jul 03
5
Ferret on 64 bit Red Hat
Can anyone verify that Ferret should work correctly on 64 bit Red Hat ES 4? The test suite gets the following segfault: ........................../unit/../unit/analysis/../../unit/index/../../unit/store/../../unit/search/tc_filter.rb:20: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [x86_64-linux] This is with version "ferret-0.9.4" on an AMD Dual Opteron 270. -- Posted via
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
2020 Sep 13
2
libva-utils test siuite is crashing in nouveau sriver
...tart = <optimized out> impl = <optimized out> repeater = <optimized out> start = <optimized out> i = <optimized out> #10 testing::internal::UnitTestImpl::RunAllTests (this=<optimized out>) at ../test/gtest/src/gtest.cc:4649 test_index = 4 start = 1600019826482 i = 0 should_shard = <optimized out> has_tests_to_run = true repeater = 0x55b48d91add0 forever = <optimized out> in_subprocess_for_death_test = <optimized out> --Type <RET> for more, q to quit,...
2006 Sep 15
3
Crashes and tests failures again with 0.10.4
...;rubyforum'') # ok >> Post.find_by_contents(''ruby-forum'') /usr/local/lib/ruby/gems/1.8/gems/ferret-0.10.4/lib/ferret/index.rb:351: [BUG] Segmentation fault ruby 1.8.4 (2005-12-24) [i686-linux] The tests run fine on Linux, on OS X testall crashes with a segfault on test_index and several of the Ruby tests fail: 1) Failure: test_sorts(SearchAndSortTest) [./test/unit/../unit/analysis/../../unit/index/../../unit/query_parser/../../unit/search/tc_search_and_sort.rb:40:in `do_test_top_docs'' ./test/unit/../unit/analysis/../../unit/index/../../unit/query_...
2006 Jun 06
0
Tests broken after freeze and upgrade - undefined method
...elop Application1 on Rails 1.0 / Ruby 1.8.2 Freeze rails into vendor folder on Application1 Develop Application2 on Rails 1.1 / Ruby 1.8.4 Return to Application1 and run tests, every test fails with the error "undefined method `verify_active_connections!" or in detail ... 221) Error: test_index(WatchlistsControllerTest): NoMethodError: undefined method `verify_active_connections!'' for ActiveRecord::Base:Class D:/svn_dbi/config/../vendor/rails/activerecord/lib/active_record/base.rb:996:in `method_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/ac...
2006 Jun 08
0
undefined method `verify_active_connections!''
I''m getting this error for every test when I run rake 221) Error: test_index(WatchlistsControllerTest): NoMethodError: undefined method `verify_active_connections!'' for ActiveRecord::Base:Class D:/svn_dbi/config/../vendor/rails/activerecord/lib/active_record/base.rb:996:in `method_missing'' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/a...
2007 Apr 18
1
Scaffolding Specs
I just wrote a really simple tool that cranks out spec scaffolds for Rails apps. It''s new and pretty simple, but you might find it useful: http://calicowebdev.com/blog/show/13 --steve
2006 Sep 26
0
some help with functional testing of nested routes
...:Unit::TestCase fixtures :products, :categories def setup @controller = ProductsController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @first_id = products(:first).id @category_id = categories(:first).id end def test_index # HTTP GET get :index assert_response :success assert assigns(:products) assert_template ''index'' end def test_new # HTTP GET get :new assert_response :success assert_template ''new'' assert_not_nil assigns(:product) en...
2006 Aug 02
1
REST and functional tests
Just playing around with converting an apps to the new REST goodness in edge rails, and I''m trying to work out how to convert/write the functional tests. Is the recommended way to explicitly use the actions (e.g. get :show, :id => ...; post :create,..., etc) and test the routes separately, or duplicate the request, in which case how is that done get "/", :id => 5
2006 Sep 09
2
search_each segmentation fault and parser anomoly
...$ ./test.rb one file:* query: +content:one +* file: f1.txt Am I missing something here? Cheers Stuart -- Stuart Rackham -----------BEGIN SCRIPT---------------- #!/usr/bin/env ruby require ''rubygems'' require ''ferret'' include Ferret path = ''/tmp/test_index'' index = Index::IndexWriter.new(:create => true, :path => path) index.field_infos.add_field(:file, :store => :yes, :index => :untokenized) index.field_infos.add_field(:content, :store => :no, :index => :yes) index << {:content => ''one'', :file...
2006 Aug 04
1
incorrect checksum for freed object?
I''m using ferret (0.9.4) in rails, but outside of the "acts_as_ferret" plugin. Whenever I use a QueryFilter (even a very simple one), the server will crash after one, two, or three reloads of a page (same page, same query, same filter). It''s very non-deterministic and I can''t seem to reproduce it outside of my application environment (I can''t get it
2006 Apr 27
6
Functional Test Problem. Nubee, please help
ALl my controllers require the user to be logged in. SO they will be redirected to my "login" controller. How do i login first in a functional test? Im assuming i use the setup method to login the controller. This is the setup method for the Activities controller functional test: def setup @controller = ActivitiesController.new @request =
2006 Oct 03
4
newbie question
...ails) and I''m having a problem I can''t fathom. Sorry for the long post ... I have a test which passes require ''rubygems'' require ''ferret'' include Ferret require ''test/unit'' class CompanyTest < Test::Unit::TestCase def test_index puts ''running test'' @index = Index::Index.new(:path => ''../tmp/search-index'') @index << {:title => "prospecting", :content => "blah blah blah"} @index << {:title => "prospecting", :content => "yada...
2006 Oct 03
4
newbie question
...ails) and I''m having a problem I can''t fathom. Sorry for the long post ... I have a test which passes require ''rubygems'' require ''ferret'' include Ferret require ''test/unit'' class CompanyTest < Test::Unit::TestCase def test_index puts ''running test'' @index = Index::Index.new(:path => ''../tmp/search-index'') @index << {:title => "prospecting", :content => "blah blah blah"} @index << {:title => "prospecting", :content => "yada...
2011 Mar 30
3
Test errors in fuctional test after adding before_filter :login_required to controller
Hello, I added the "before_filter" to my controllers to require a login of the user. Here''s an example of my Unit Controller with the added before_filter: IN THE ATTACHED FILE When executing the tests with rake test, I get different error messages. To show you my errors, I only executed the unit controller test with the following line: ruby -Itest
2012 May 11
14
What is the point of using :format in routes?
Today I had a strange behavior that made me suspect of jQuery at first, but then it happened that I''ve faced two gotchas, one from CoffeeScript and one from Rails itself. I have something like this: routes.rb post ''/fields/:id.:format'' => ''fields#show'', as: :field, constraints: {id: /\d+/} post ''/fields/remove/:id''
2005 Aug 25
1
newbie questions about hosting address
...; Content-Type: text/plain; charset=ISO-8859-1; format=flowed Hi all, I''m trying to follow the Rails book, and I''m the testing chapter. I was trying to run the code in the page 149 and a DoubleRenderError shows up at the ''get'' line in the following code: def test_index get :index assert_response :success end I''ve read about DoubleRenderError, but they talk about redirect_to, but not about get method. How can I solve this? TIA, Vamsee. ------------------------------ _______________________________________________ Rails mailing list Rails-1W37MKcQCpI...
2010 Feb 11
1
[PATCH] Provides a reference implementation management server.
...+functional tests exercise the whole application and its WSGI stack. + +Please read http://pythonpaste.org/webtest/ for more information. + +""" +from nose.tools import assert_true + +from ovirtserver.tests import TestController + + +class TestRootController(TestController): + def test_index(self): + response = self.app.get('/') + msg = 'TurboGears 2 is rapid web application development toolkit '\ + 'designed to make your life easier.' + # You can look for specific strings: + assert_true(msg in response) + + # You...