On Jan 27, 2006, at 11:46 PM, Bob Silva wrote:
> Different question this time, and maybe only a core developer can
> answer.
>
>
>
> In 1.0, use_instantiated_fixtures is turned off by default. What
> is the new best-practice for not tying your tests to your test data?
>
>
>
> Before you would use:
>
>
>
> In clients.yml
>
>
>
> first_client:
>
> id: 1
>
> name: Fred
>
>
>
> In a test case:
>
>
>
> def test_sometest
>
> assert_equal @first_client.name, @client.name
>
> end
>
>
>
> With this setting turned off be default, for obvious reasons, is
> there a different method of doing the test so it is not dependent
> on the actual data?
assert_equal clients(:first_client).name, @client.name
--
-- Tom Mornini
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060128/acfb90d8/attachment.html