bcardarella / valid_attribute

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

uninitialized constant Object::Test - When using Minitest-Matchers #14

Closed rosstimson closed 13 years ago

rosstimson commented 13 years ago

I cannot seem to get this working with Minitest-Matchers and get uninitialized constant Object::Test as soon as I try running rake test. As soon as I remove ValidAttribute from my app everything works fine. I have also tried with Shoulda-Context and it seemed to work as expected. Apologies in advance if I'm being a n00b here.

System

rake aborted!
uninitialized constant Object::Test
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/ext/module.rb:36:in `const_missing'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/valid_attribute-1.2.0/lib/valid_attribute/test_unit.rb:1:in `<top (required)>'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/valid_attribute-1.2.0/lib/valid_attribute.rb:13:in `require'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/valid_attribute-1.2.0/lib/valid_attribute.rb:13:in `<top (required)>'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `require'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `each'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:66:in `block in require'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `each'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler/runtime.rb:55:in `require'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.18/lib/bundler.rb:120:in `require'
/Users/rosstimson/code/ruby/valid-attrib/config/application.rb:7:in `<top (required)>'
/Users/rosstimson/code/ruby/valid-attrib/Rakefile:5:in `require'
/Users/rosstimson/code/ruby/valid-attrib/Rakefile:5:in `<top (required)>'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:495:in `raw_load_rakefile'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:78:in `block in load_rakefile'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:77:in `load_rakefile'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:61:in `block in run'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290@global/gems/rake-0.9.2/bin/rake:32:in `<top (required)>'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `load'
/Users/rosstimson/.rvm/gems/ruby-1.9.2-p290/bin/rake:19:in `<main>'
bcardarella commented 13 years ago

You'll want to check with the Minitest-Matchers author as it was specifically written for ValidAttribute https://github.com/bcardarella/valid_attribute/pull/13

rosstimson commented 13 years ago

Thanks for your very prompt response, I've since submitted the issue to Minitest-Matchers as advised: https://github.com/zenspider/minitest-matchers/issues/2