similar to: Rails Unit test Problem

Displaying 20 results from an estimated 200 matches similar to: "Rails Unit test Problem"

2006 Feb 15
2
Ruby install tips
---------- Forwarded message ---------- From: Luciano Broussal <luciano.broussal@gmail.com> Date: Feb 15, 2006 5:00 PM Subject: [Rails] To: rails@lists.rubyonrails.org Hi all, Is anybody know how + to install a ruby application (persitent , after computer restart) in the system tray. Is any body know an installer to package ruby application and to compile it as an file .exe Thank you all
2006 Mar 01
5
rails models, logging and testing
Hello, I am using rails 1.0 and I have following questions. Please help me. [1] How can I do logging in the rails models? I checked the wiki but didn''t find anything which I explained how to do logging in models. [2] Say I have a certain model, when I declare a function in the model, and try to use that function from a view or a unit test, I get an error. For views the error occurs
2005 Dec 15
4
Order of tests matters???
I have a problem with tests. I always thought that the order of tests doesn''t matter because the fixtures are reloaded before every test method. However, I''ve just discovered that this isn''t true. This is a quote from the "Guide to testing the rails" howto: "... if we had another test method, we wouldn’t have 10 users on the 2nd test because they would
2008 Feb 02
6
Suspended start of task not suspended
Hi I thought this should suspend the task by 1 minute, but it starts immediately: MiddleMan.ask_work( :worker => :bar_worker, :worker_method => :test_method, :trigger_args => { :start => (Time.now + 1.minute)}) Is the start argument not allowed in the new backgroundrb (mine is at rev HEAD (=314))? What can I do about this? I really need to suspend starting the task as I want
2006 Feb 22
1
ActiveRecord strange behavior
Hi all, I have a has_many relation between Parent and Child Parent p Child c p.children << c => create the relationship in the database (why not need p.save to see the child add?) why when i modifiy a field in c.how_old i have to explicity call to c.save if i want to see the modification in database (p.save doesn''t persist the modification of chlild c) because when i modify
2005 Oct 28
2
Accessing fixture
I have a very simple problem. I can''t seem to access a the fixture by name I have a sites.yml with: simple_site: id: 1 name: demo description: A demo site created_on: 2005-10-25 00:00:00 updated_on: 2005-10-25 00:00:00 And I have a test class as: require File.dirname(__FILE__) + ''/../test_helper'' class SiteTest < Test::Unit::TestCase fixtures
2005 Oct 27
2
Fixtures are not loading into instance variables. Why not?
Hi, I have a fixture in a unit test and I see that the fixture is loaded correctly into the database table, but no instance variables are created. So now I''m stuck. More background: this is my first RoR project and I have just installed the SaltedLoginGenerator and generated its output. Running the unit tests gives an error, so I cut it down to just 1 test:
2006 Mar 31
5
Model reloading problem
Hi all, I''ve a model class Toto in the model directory. I don''t understand why i have to restarts WebBrick to view changes i make in this class FYI : in the development. rb i desabled class cache with config.cache_classes = false Regards Luciano -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Jun 28
7
Custom report outputting text, expected and actual on succes?
I would like to output the following information when running a spec (_also_ on success): - the description text - the expected value - the actual value After looking through the documentation I thought custom formatters might be the way to go, but unfortunately it does not look like all variables are accessible from there? I need this for an academic report where all testing needs to be
2006 Jan 05
2
Agile Depot Tutorial Help
anyone can explain me why in the Agile Depot Tutorial application they use i.product_id to find if a product already exist in the cart, because the cart contains items, each of them references a product. I tried i.product_id like in the tutorial and i.product.i all of these 2 notation works , but i find the second seems more clean??? isn''t it. Any explanation will be fine Regards
2006 Aug 03
9
Rails Cheatsheets!!!
Hey if you know any rails cheatsheet link add it inot the follwing list, lets make a long list on Rails cheatsheet.... ;) 1) 2) 3) 4) . . . -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060103/a6eea2ac/attachment-0001.html
2006 Jul 25
2
routing tests
Hi there, is there a script/console like program where I can test my routing? IIRC there is something like that in the agile web dev. with rails book. Patrick -- Posted via http://www.ruby-forum.com/.
2006 Mar 23
7
Fixtures just Do Not Work for Me
Hello, I have been struggling to get fixtures to work here with no success. They just Do Not Work For Me (tm). I have created a model named Headline with the `generate'' script and modified the test/fixtumes/headlines.yml as follows ---------- gita: id: 1 author: raulseixas title: gita happened_at: 2005-01-01 00:00:00 description: gita This is the CD reissue of
2005 Sep 29
1
More Random Behaviour
Okay, I'm starting to face professional ridicule at work over this. A Samba install should take a couple of days, I've been at it... far to long now. When this started I chased the problem in all the wrong directions. I thought it was this environment. Now I don't think so. I have Samba 3.0.14a installed on an AIX 5.2 server. I had it running (not the way I wanted, but running).
2006 Mar 31
0
packaging
Hi all, I would like to know where put personnal classes that are not either model or helper. In lib/ but it''s seems not reloadable when i change code. it''s painfull to have to restart each time webbrick to take account changes from /lib Regards. Croco -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Feb 15
0
Hi all, Is anybody know how + to install a ruby application (persitent , after computer restart) in the system tray. Is any body know an installer to package ruby application and to compile it as an file .exe Thank you all Croco -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Jun 27
5
How to make attachment_fu generate RESTFUL URL
hi folks: I follow this article:http://clarkware.com/cgi/blosxom/2007/02/24 all goes well except the public_filename ,it return something like "photos/0000/0001/test.jpg" ,not the expected RESTFUL URL LIKE ''photos/1/test.jpg'',any suggestion? My Env is Rails 1.2.3 on Ruby 1.8.6 with attachment_fu from http ://svn.techno-weenie.net/projects/plugins/attachment_fu/ by now
2007 Jul 11
7
Best way to upload an image and make a thumbnail
Hi, which is the best way to upload an image, keep that and also make a thumbnail? The images should not be stored in the database, but as normal image files in a specific directory. I think that for the thumbnail i should use rmagick, but for the upload ? (something which work with and without javascript, in every browser) Thanks :) -- Posted via http://www.ruby-forum.com/.
2007 Mar 12
1
rspec on rails instantiated fixtures OFF by default ?
Hi there, Why are the instantiated fixtures turned off by default in the rspec on rails plugin? This was not the case in older versions. After upgrading (and much head scratching) I had to turn on the instantiated_fixtures in spec_helper thusly ... self.use_instantiated_fixtures = true Regards, Keith
2006 Aug 17
2
How to trigger an action from script/console
Hi, I have build a conversion script from an old database to a new one (which is designed to work with ROR), and every action converts one table and takes over 5 minutes... When I trigger the actions from my browser, I finally end up with a "Failed to start properly"... So, simple question: How can I do this from the console, that is to say, trigger one of my controller''s