bcardarella / valid_attribute

Minimalist validation BDD for ActiveModel specs
178 stars 18 forks source link

Avoid "unitialized constant Test" error when not using test/unit #23

Closed rodrigomanhaes closed 12 years ago

rodrigomanhaes commented 12 years ago

If you do not require 'test/unit, an "unitialized constant Test" error is raised.

bcardarella commented 12 years ago

I think it is better to add a condition to valid_attribute.rb that is similar to the line:

if defined?(Test::Unit)
  require 'valid_attribute/test_unit'
rodrigomanhaes commented 12 years ago

Ok!

bcardarella commented 12 years ago

Just updated: https://github.com/bcardarella/valid_attribute/commit/6bf0c1d17b3bb8479c43b43207ea9e5bfaf93a59

Thank you