Every repository with this icon (
Every repository with this icon (
| Description: | Simplifying tests! edit |
-
(Ruby 1.9.1) uninitialized constant Remarkable::ActiveRecord (NameError)
0 comments Created about 1 month ago by jachenryspec_helper.rb
... require 'spec/autorun'
require 'spec/rails'
require 'remarkable_rails'
...results in the following error on ruby 1.9.1
/opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:443:in `load_missing_constant': uninitialized constant Remarkable::ActiveRecord (NameError)
from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:80:in `const_missing_with_dependencies' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/remarkable_rails-3.1.10/lib/remarkable_rails/active_orm.rb:17:in `<top (required)>' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/remarkable_rails-3.1.10/lib/remarkable_rails.rb:25:in `<top (required)>' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:158:in `require' from /Users/user/repos/project.com/spec/spec_helper.rb:7:in `<top (required)>' from /Users/user/repos/project.com/spec/models/brand_spec.rb:1:in `require' from /Users/user/repos/project.com/spec/models/brand_spec.rb:1:in `<top (required)>' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:15:in `load' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:15:in `block in load_files' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:14:in `each' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/example_group_runner.rb:14:in `load_files' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/options.rb:132:in `run_examples' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/lib/spec/runner/command_line.rb:9:in `run' from /opt/local/lib/ruby1.9/gems/1.9.1/gems/rspec-1.2.9/bin/spec:5:in `<main>'Comments
-
ValidateLengthOfMatcher works incorrectly with i18n
0 comments Created 28 days ago by wildchildValidateLengthOfMatcher should pass actual :count option in order to construct valid error message from model. Currently it always set to "12345".
http://github.com/carlosbrando/remarkable/blob/master/remarkable_activerecord/lib/remarkable_activerecord/base.rb#L185Comments
-
Hello carlosbrando,
What you think about use validation_reflection gem to make the ActiveRecord validations?
This will improve speed significantly and add support for more specific options like :if and :unless (currently unsupported). Also the tests will run without querying the database.
Best regards
Comments
-
typo issue when test habtm association with conditions as hash
2 comments Created 14 days ago by sobrinhoSee the code to understand:
should_have_and_belong_to_many :watches, :class_name => 'List', :conditions => { :pvt => false }The output:
should have and belong to many watches with class name "List" and with conditions "pvtfalse"
I think this can be:
should have and belong to many watches with class name "List" and with conditions "pvt" equal "false"
This is just a small typo detail, if you can fix it i will appreciate :)
Best regards
Comments
carlosbrando
Wed Nov 11 18:19:56 -0800 2009
| link
sobrinho,
I tried to reproduce the same problem and I got the following result:- should have and belong to many watches with class name "List" and with conditions {:pvt=>false}Can you give us more information to help reproduce this problem the way you say? Which version of Remarkable are you using?
Ruby: ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
Rails: 2.3.3
Remarkable: 3.1.11
Rspec: 1.29I changed test to fail and have the same behavior:
'User associations should have and belong to many watches with class name "List" and with conditions "pvttrue"' FAILED Expected User records have and belong to many watches with options {:class_name=>"List", :conditions=>"pvttrue"}, got {:class_name=>"List", :conditions=>"pvtfalse"} -
I believe so far, only validate_is_unique is implemented.
Is there plan to implement the rest of the matchers?
Comments











