codegram / date_validator

A simple, ORM agnostic, Ruby >=2.2 compatible date validator for Rails, based on ActiveModel.
http://thoughts.codegram.com/date-validation-with-rails-3
MIT License
495 stars 82 forks source link

Require the ActiveSupport extensions needed in lib, not test. #63

Closed Haegin closed 8 years ago

Haegin commented 9 years ago

Rather than requiring the extensions in the tests, we can just require what we need in the place we need it.

New tests aren't needed - the original tests were passing because necessary dependencies were loaded in the test_helper rather than in the runtime code.

Without this you can't use the date_validator gem unless you're already loading ActiveSupport in your project.

oriolgual commented 9 years ago

:+1: but the build seems to fail on AS 4+, could you look at it?

Haegin commented 9 years ago

@oriolgual Sorry about that. I've now fixed up that problem and the tests pass on 3.2, 4.0 and 4.2.

oriolgual commented 9 years ago

Just one last thing, can you squash the commits into a single one? :angel:

Haegin commented 9 years ago

Sure thing. Squashed!

Haegin commented 9 years ago

I can see the build has now failed on 1.9.3 and ActiveRecord 4.2. I'm not sure why but I'm trying to get things set up locally so I can test this particular combination. It's strange that it was successful in the unsquashed commit though.

oriolgual commented 8 years ago

Seems it was an error with Travis, fixed now!