Displaying 1 result from an estimated 1 matches for "sitetest".
2005 Oct 28
2
Accessing fixture
...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 :sites,
:contenttypes,
:contentitems
def setup
end
def test_create
puts @sites
puts @sites["simple_site"]
end
end
When I attempt to print out the fixture I just get
nil. I thought you reference the...