On Nov 7, 9:06 am, Greg Lazarev
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> I''m curious about standards on unit testing modules.
>
> I have a module file in my lib/ directory. Should I create a unit test
> in test/unit directory and test it as I would any other model?
Don''t know if there''s a standard but I think it makes sense
just to
test
it in test/unit.
> Is there any kind of naming convention used for unit test files for
> modules (some_name_test.rb or some_name_module_test.rb)?
Don''t know. If it''s lib/some_name.rb then test/unit/
some_name_test.rb
seems ok with contents:
require File.dirname(__FILE__) + ''/../test_helper''
class SomeNameTest < Test::Unit::TestCase
...
end
Works for me at the moment.
--
Daniel Bush
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---