bcardarella / valid_attribute

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

README incorrect #24

Closed noctivityinc closed 11 years ago

noctivityinc commented 11 years ago

I believe the README is incorrect for requiring valid_attribute for unit_tests. I believe the correct require statement is simply

require 'valid_attribute/test_unit'

bcardarella commented 11 years ago

That should not be the case as this line will detect for Test::Unit and load the proper file:

https://github.com/bcardarella/valid_attribute/blob/master/lib/valid_attribute.rb#L15

Are you sure Test::Unit is loaded before ValidAttribute?

bcardarella commented 11 years ago

@noctivityinc can I get an update on this?

noctivityinc commented 11 years ago

Sorry. I'm away now but will update you tomorrow.

J

Sent from my  iPhone

On Oct 21, 2012, at 10:37 AM, Brian Cardarella notifications@github.com wrote:

@noctivityinc can I get an update on this?

— Reply to this email directly or view it on GitHub.

noctivityinc commented 11 years ago

I now have it loaded into a Spork block as such as it works fine so I'll close this. Thanks.

Spork.prefork do

Loading more in this block will cause your tests to run faster. However,

if you change any configuration or code from libraries loaded here, you'll

need to restart spork for it take effect.

ENV["RAILS_ENV"] = "test" require File.expand_path('../../config/environment', FILE) require Rails.root.join("db/seeds") require 'rails/test_help' require "paperclip/matchers"

require 'valid_attribute/test_unit'

require 'valid_attribute'