Displaying 3 results from an estimated 3 matches for "test_fixtures".
2005 Dec 31
2
Test Unit Problem
...available: 2005-12-31 06:53:00
I also have the following product_test.rb file to test the fixture
above:
require File.dirname(__FILE__) + ''/../test_helper''
class ProductTest < Test::Unit::TestCase
fixtures :products
def setup
@product = Product.find(1)
end
def test_fixtures
assert_kind_of Product, @product
assert_equal 1, @product.id
assert_equal "Dell PC", @product.title
assert_equal "Dell PC", @product.description
assert_equal "http://.../pc_image.jpg", @product.image_url
puts "class of @product.price = #{@product.pri...
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
2006 Jun 23
0
to_yaml problem with option hash
Hi,
I''m trying to make a fixture for testing with a serialized column. In
the YAML fixture I''m trying to fill the serialized column with the
to_yaml function. But I keep getting the ''---'' separator, which I don''t
want because it is only a ''partial'' yaml fill.
According to the documentation to_yaml takes a hash of options, so