Skip to content

Instantly share code, notes, and snippets.

@rsim
Created November 30, 2009 22:21
Show Gist options
  • Save rsim/245825 to your computer and use it in GitHub Desktop.
Save rsim/245825 to your computer and use it in GitHub Desktop.
1)
'DataMapper::Query#difference with mysql with other having a limit should put each query into a subquery and AND them together, and negate the other' FAILED
expected: #<DataMapper::Query::Conditions::AndOperation:0x6a22a6bb @operands=#<Set: {#<DataMapper::Query::Conditions::EqualToComparison @subject=#<DataMapper::Property @model=User @name=:name> @dumped_value="Dan Kubb" @loaded_value="Dan Kubb">, #<DataMapper::Query::Conditions::NotOperation:0x5f44426c @operands=#<Set: {#<DataMapper::Query::Conditions::InclusionComparison @subject=#<DataMapper::Associations::OneToMany::Relationship:0xc00a029 @reader_visibility=:public, @query={}, @child_repository_name=#<DataMapper::Repository @name=default>, @parent_model=User, @max=Infinity, @options={:min=>0, :max=>Infinity, :child_key=>[:name], :parent_key=>[:name], :child_repository_name=>#<DataMapper::Repository @name=default>, :parent_repository_name=>#<DataMapper::Repository @name=default>}, @min=0, @parent_repository_name=#<DataMapper::Repository @name=default>, @child_model=User, @parent_properties=[:name], @name=:self, @child_properties=[:name], @writer_visibility=:public, @parent_model_name="User", @instance_variable_name="@self", @child_model_name="User"> @dumped_value=[#<User @name="User 0" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 1" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 2" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 3" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 4" @citizenship=<not loaded> @referrer_name=<not loaded>>] @loaded_value=[#<User @name="User 0" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 1" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 2" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 3" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 4" @citizenship=<not loaded> @referrer_name=<not loaded>>]>}>, @parent=#<DataMapper::Query::Conditions::AndOperation:0x6a22a6bb ...>>}>>,
got: #<DataMapper::Query::Conditions::AndOperation:0x547d5b6e @operands=#<Set: {#<DataMapper::Query::Conditions::EqualToComparison @subject=#<DataMapper::Property @model=User @name=:name> @dumped_value="Dan Kubb" @loaded_value="Dan Kubb">, #<DataMapper::Query::Conditions::NotOperation:0x3329aa21 @operands=#<Set: {#<DataMapper::Query::Conditions::InclusionComparison @subject=#<DataMapper::Associations::OneToMany::Relationship:0x4acfed14 @reader_visibility=:public, @query={}, @child_repository_name=#<DataMapper::Repository @name=default>, @parent_model=User, @max=Infinity, @options={:min=>0, :max=>Infinity, :child_key=>[:name], :parent_key=>[:name], :child_repository_name=>#<DataMapper::Repository @name=default>, :parent_repository_name=>#<DataMapper::Repository @name=default>}, @min=0, @parent_repository_name=#<DataMapper::Repository @name=default>, @child_model=User, @parent_properties=[:name], @name=:self, @child_properties=[:name], @writer_visibility=:public, @parent_model_name="User", @instance_variable_name="@self", @child_model_name="User"> @dumped_value=[#<User @name="User 0" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 1" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 2" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 3" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 4" @citizenship=<not loaded> @referrer_name=<not loaded>>] @loaded_value=[#<User @name="User 0" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 1" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 2" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 3" @citizenship=<not loaded> @referrer_name=<not loaded>>, #<User @name="User 4" @citizenship=<not loaded> @referrer_name=<not loaded>>]>}>, @parent=#<DataMapper::Query::Conditions::AndOperation:0x547d5b6e ...>>}>> (using ==)
/usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/expectations/fail_with.rb:41:in `fail_with'
/usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/operator_matcher.rb:39:in `fail_with_message'
/usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/operator_matcher.rb:61:in `__delegate_operator'
/usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/operator_matcher.rb:51:in `eval_match'
/usr/local/jruby-1.4.0/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/operator_matcher.rb:29:in `=='
./spec/semipublic/query_spec.rb:1562:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment