similar to: Problem running unit tests

Displaying 20 results from an estimated 2000 matches similar to: "Problem running unit tests"

2005 Dec 20
9
Rails Configuration Question
Hello Everyone, I have been reading this mailing list for a while and am impressed with the generous help that many here are eager to provide. Perhaps someone will be able to shed some light on a configuration issue I am having. Thank you in advance for any assistance. First, system setup details: #System Setup# * OS: Fedora Core 4 running in a VMWare box on Windows XP * Database: MS SQL
2006 Jan 05
8
Repost - Do dynamic finders work with legacy schemas?
Hello everyone, I have another question related to a legacy schema I am working with. Do dynamic finders work with legacy schemas in general? The schema I am working with uses hungarian prefixes for column names. For example fOpen is 0 if a bug is closed and 1 if it is open (type smallint). When I try @bugs = Bug.find_all_by_fOpen(1), I get the following exception: undefined method
2006 May 03
6
Versioning the contents of a table as a set
I am looking at using acts_as_versioned to manage revisions of data in several tables in my application. However, the default behavior of acts_as_versioned appears to apply to individual rows within a table. The tables I want to version are complicated lookup tables and what I really want is to version the entire contents of each table as a single set. Adding a row, deleting a row, or updating
2006 Apr 18
11
Which database to choose for a new Rails application - MySQL 4.1 or 5.0?
Hi I''m choosing a database for a new Rails application. I pretty much ruled out PostgreSQL, since despite good reviews of the database itself, it seems it has countless issues with Rails (for example: in recent releases migrations don''t work, and unit-tests fail). So I should now choose between MySQL 4.1, which as I understand enjoys widespread popularity - perhaps the most
2006 May 04
2
Is there a way to version the contents of a table as a set?
I am looking at using acts_as_versioned to manage revisions of data in several tables in my application. However, the default behavior of acts_as_versioned appears to apply to individual rows within a table. The tables I want to version are complicated lookup tables and what I really want is to version the entire contents of each table as a single set. Adding a row, deleting a row, or updating
2006 May 10
6
Migrations don''t really support transactions
I read in various places that although migrations aren''t transactional, all you need to do is wrap you migration method in "ActiveRecord:: Base.connection.transaction do" to make the self.up or self.down transactional. In my experience (Rails + PostgreSQL), this doesn''t work very well. If my migration hits an exception, any tables that were touched remain modified.
2006 Jan 05
10
OT -- A "HOWTO" is a guide not a question.
This is way offtopic, but I''ve seen this several times recently and it''s annoying me. If you put "HOWTO" in your subject that means that you''re posting a guide on a particular topic. It doesn''t mean that you''re asking a question about "how to" do something. It''s not like it''s a crisis, but it screws up searches
2006 Apr 11
18
Rails 1.1 in Production
My hosting company is still supporting only Rails 1.0. I have installed Rails 1.1.2 to my vendor directory and deployed it in production which should mean that my application should be using the Rails version in my vendor diretory. But It looks like its still using local gem libraries, here is the error from dispatch.fcgi when I try and invoke my app NoMethodError (undefined method
2006 Apr 11
6
Reduce Number of Queries When Using ActiveRecord
I have a controller method called update_all that grabs parameters for about 30 form fields and saves them to the database. My current code looks to see if there is a string in params[] for each form field (two fields for each SelfEvaluationItem) and saves the updated self_evaluation_answer if a string is available. Since this is iterated code, I am almost certain that this generates 30 or so
2005 Dec 25
4
How to display a welcome page
Wow, I can''t believe that after a few weeks of playing around with Rails I got stuck on something that seems like it should be really simple. How do I display a default welcome page for visitors who are not logged in and send logged in users to the appropriate controller. I am using the login_engine and the user_engine. The two methods I have seen looking at sample code are to stick a
2006 Apr 13
8
Controller paths
Hi there. Suppose I create some controllers like ruby script/generate controller Admin::product add remove ruby script/generate controller Admin::user add remove ruby script/generate controller Login login logout the directory structure will be app/controllers/admin/product_controller.rb app/controllers/admin/user_controller.rb app/controllers/login_controller.rb Now suppose I need some links
2006 Apr 17
2
installation of ruby on rail on linux fedora
i installed and work fine with ruby on rails on windows. i used onlamp.com sites tutorial for that. now i want to install it on linux. how i can? Please help.... Thank You in advance -- Posted via http://www.ruby-forum.com/.
2006 Jun 28
2
undefined method `use_transactional_fixtures=''
Folks, I checked my test_helper.rb and it has self.use_transactional_fixtures = true My code was generated with 1.1.2 and I''m using 1.1.3 right now after but the error persists. I googled for this issue and it appears that a require is missing or something like that. I can''t figure it out, please help! /opt/local/bin/ruby -Ilib:test
2006 May 11
4
string to date/time?
Hey All, Anyone know of a library for parsing "human" dates, like "this friday" or "2 days ago"? I used to use strtotime in php, but starting from here; http://wiki.rubyonrails.com/rails/pages/PhpStrtotime and doing lots of googling, I haven''t been able to find anything similar for ruby. I know of javascript solutions to this, but I''d need to do
2006 May 05
7
Testing model: test becomes dependent on previous test
Im having trouble with Testing models. im following the tutorials in the book Agile Web Development with Rails. if i execute the code product_test.rb, i get this error: ============================================================ 1) Failure: test_update2(ProductTest) [test/unit/product_test.rb:30]: <29.95> expected but was <99.95>. 3 tests, 11 assertions, 1 failures, 0 errors
2005 Dec 23
6
Agile book - test error
Hi all, I get an error when testing the "store_controller_test.rb" The troublesome line is in the test below: def test_add_to_cart get :add_to_cart, :id => @version_control_book.id <<< cart = session[:cart] assert_equal @version_control_book.price, cart.total_price assert_redirected_to :action => ''display_cart'' follow_redirect
2006 May 07
4
Getting column value from lookup table in HABTM relationship
I have a HABTM relationship between my agents and listings tables. Each listing can have many agents and each agent can have many listings. In the agents_listings table I have a column called ''is_primary_agent'' which denotes if the agent is responsible for the listing - only one agent can be primary. At the moment I use this in my listing_controller''s view
2006 May 06
3
[BUMP] conditional require? conditional action code?
Greetings all. I have some controller code that uses win32ole (only available on windows). This code is now solid, and I''d now like to resume development on (any) other OS(grin). But alas, the controller bails because the OS specific library can''t be found. Can I conditionally specify action code compilation (and a require ''win32ole'') based on OS or
2006 May 12
2
Logical organization of controllers
I find that many of my controllers have a dozen or more methods and that it can take a few moments to orient myself when I open a controller I haven''t looked at in a while. Does anyone have suggestions for organizing methods in a controller (alphabetical, by function, etc) to increase readability and scanability? -------------- next part -------------- An HTML attachment was scrubbed...
2005 Dec 22
13
in-memory SQLite for testing
I am following the rails book, and arrived to the section about testing. The test database is configured as: test: adapter: sqlite3 database: ":memory:" and I get this error with the simple product test: % ruby test/unit/product_test.rb Loaded suite test/unit/product_test Started E/usr/local/lib/ruby/gems/1.8/gems/sqlite3-ruby-1.1.0/lib/sqlite3/ errors.rb:94:in