similar to: My first test - named fixture not autoloading instance variable

Displaying 20 results from an estimated 2000 matches similar to: "My first test - named fixture not autoloading instance variable"

2005 Dec 31
2
Test Unit Problem
Hello All, I am experiencing the following test unit error working with Rails that I can''t fathom. I have a products.yml file which holds the following test fixture for the products table: dell_pc: id: 1 title: Dell PC description: Dell PC image_url: http://.../pc_image.jpg price: 15000.00 date_available: 2005-12-31 06:53:00 I also have the following product_test.rb file to
2006 Apr 21
2
NoMethodError with test_read_with_hash
While running the product_test.rb test fixture in the Agile Web Development book (p. 148), but when I run ruby test/unit/product_test.rb, I get the following error: 1) Error: test_read_with_hash(ProductTest): NoMethodError: You have a nil object when you didn''t expect it! You might have expected an instance of Array. The error occured while evaluating nil.[]
2006 Jun 08
1
fixtures instance variable naming
hi all, trying my first foray into testing and having trouble with accessing the fixture instance variable built a test for my NewsRelease model. have a news_releases.yml as a fixture with: first: id: 1 title: my first release body: this is still my first test of a news release publish: 0 date_publication: 2006-06-06 17:28:00 in news_release_test.rb, i have def setup
2006 Jan 03
3
Rails Noob Question
Apparently the first time I posted this, it was tacked onto the end of another thread. Please pardon my repost. Won''t happen again. -------- Howdy. I''m just getting into Rails, and really enjoying it! I''m coming from the .NET world, so I''ll embarrassedly admit that I''m running it on winXP and even using SQLServer (for now, may switch to mysql
2006 Jan 19
4
hash fixture access broken in functional test
I have a functional test class that uses the "topics" fixture. I verified that the fixture is loaded into the database by doing this: assert_equal 2, Topic.find_all.size So I should have an instance variable called @topics and instance variables for each of the rows in the fixture, in this case, @first and @another. But all those variables are nil inside my test method. Is that
2006 Feb 10
5
Re: Manually running dispatch.fcgi fails (Please help!!)
I''m really lost on this issue. Do I need to reinstall rails / gems? The rest of my rails setup seems to be working. I just can''t run dispatch.fcgi. (Details in original message below). I have no idea how to troubleshoot this. I''m not even positive it is supposed to be runnable from the command line. I found a troubleshooting guide that implied it was supposed to
2006 Aug 10
7
Mongrel and SSL?
I have a small intranet app with only 20 or so users. I''m currently using lighttpd w/ssl for production and mongrel for dev. I don''t think Mongrel supports ssl, but what is the easiest front-end to put in front of it? Pound? Thanks Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century
2006 Feb 15
5
Lighttpd now works for production. Development is broken?
I''ve finally gotten lighttpd working for my production instance (SUSE 10.0 with SSL). (Had to install the fcgi dev toolkit, the SUSE 10 ruby-fcgi rpm, and the fcgi gem. I''m not positive all 3 were required, but that is what I did.) Now the devel instance of my app is broken. I''m not sure how to fix it. Previously I was using WEBrick for both devel and production.
2006 Apr 12
8
newbie radrails question
I''ve just install Eclipse with RadRails for the first time. I''m trying to follow the very simple DemoAppPart1 at http://wiki.awebfactory.com.ar/awebfactory/published/DemoAppPart1 When I click on the DepotServer and try to start it WEBbrick is not starting. I can cd to the base directory and run script/server and it works. Any idea what I''m doing wrong? Thanks Greg
2006 Jan 16
17
LoginEngine / UserEngine conceptual help
All, I have a small Intranet app I''m trying to get ready for remote access. (I only have 15 or so users for now and I don''t plan to be adding very many more.). I have installed the login engine and it seems to be working as advertized. (Great job!) For my needs I don''t want random people to be able to register and get access to my app, but I will need to register
2005 Dec 27
3
created_on & updated_on - helper to display date only
All, My initial list is rather busy. I would like to shorten the created_on and updated_on fields to just display the date, not the time. Best wold be a simple 12/28/05 type of presentation. I''ve found the format helpers in rdoc. (ie. distance_of_time_in_words_to_now ), but none seem to be what I''m looking for. How do I control the date format of a timestamp field? Thanks
2005 Dec 22
4
Is "case" a magic name
I''m a newbie. My first app is using a table called cases. With just "scaffold :case" I get the basic list to show up. I just did a "generate scaffold case case" (I think that is correct). Now when I try to list my cases, I''m getting a syntax error on all of the view source code that references "case". ie. <% for case in @cases %> Thanks
2006 Jul 10
3
search plugin?
All, I know there are 3 or 4 search plugins out there. I''m trying to find one that will allow me to search associated fields. My database content is pretty small, so efficiently is not so critical. On the other hand I have ton of :belongs_to type fields, so I need something that works well with the Rails models. Any recommendations? == Example of what I need to work Assume I have a
2006 May 05
2
newbie ruby string match question
All, I want to know in the Application.rb controller if I''m on the login screen. When I''m on the page I care about the controller variable is "#<ActiveRbac::UserController:0x408b3d6c>" So I want something like: if controller contains ActiveRbac::UserController What is the right syntax for the above? Thanks Greg -- Greg Freemyer The Norcross Group Forensics
2006 Mar 30
11
Rails 1.1 and Ruby 1.8.3
I''ve seen that Rails 1.1 is not reliable with Ruby 1.8.2 so you should upgrade to 1.8.4 I''m running ruby 1.8.3. What''s the story with it? Do I need to upgrade before I try Rails 1.1? Thanks Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century
2008 Jan 15
2
Reproducible samba bug with directory name
I just recreated this bug in samba-3.0.26a-3.3. It is as simple as creating a directory named "F-08-6104 International Management Assoc." (without the quotes), then looking at the name of the directory via XP. I've done it twice now: OpenSUSE 10.2 + Samba 3.0.23d-19.7 + XFS, all from Novell OpenSUSE 10.3 + samba-3.0.26a-3.3 + XFS, all from Novell With both I get the same wrong
2006 Mar 15
5
Passing params to a component
I see from http://rubyonrails.org/api/classes/ActionController/Components.html that is possible to pass paramaters to a component. I don''t understand the exact syntax. I''m trying: @master_id = @params[''master_id''] in the components controller but it is not working. ==== Details: In my calling view I have: <%= h(@opportunity.id) %> <div
2006 Jan 16
2
Basic (newbie) Webrick / ssl config question
I have a simple Intranet app I want to make accessible via the Internet for remote access by our employees. I want to use ssl (https) connections and I''ve found enough messages to imply Webrick as included in rails can do the job. The message at http://wrath.rubyonrails.org/pipermail/rails/2005-January/001993.html even appears to tell me exactly how to do it by modifying
2006 Apr 04
4
Ruby 1.8.4 on SUSE 10.0 howto
All, I just installed ruby 1.8.4 on my SUSE 10.0 box. It was slightly convoluted so I thought I would post the solution here. Once this runs for a day or so I will try upgrading my rails to 1.1 === Ruby 1.8.4 on SUSE 10.0 Howto I downloaded the src.rpm from http://mirrors.kernel.org/opensuse/distribution/SL-OSS-factory/inst-source/suse/src/ruby-1.8.4-9.src.rpm Then I installed it with
2006 Jul 17
3
Plugins and Engines
I''m trying to work out how to use the functionality from a plugin in an engine. It sounds weird, but it''s actually not so strange. I assume I can''t just add a vendor directory to an Engine, so some strategy for getting the plugin in the lib folder is probably necessary (and then requiring the plugin, perhaps?). -- Yehuda Katz -- Posted via