spec/association_reflection_spec.rb in sequel-2.0.1 vs spec/association_reflection_spec.rb in sequel-2.1.0
- old
+ new
@@ -38,13 +38,13 @@
describe Sequel::Model::Associations::AssociationReflection, "#reciprocal" do
it "should use the :reciprocal value if present" do
@c = Class.new(Sequel::Model)
@d = Class.new(Sequel::Model)
- @c.many_to_one :c, :class=>@d, :reciprocal=>:@xx
+ @c.many_to_one :c, :class=>@d, :reciprocal=>:xx
@c.association_reflection(:c).should include(:reciprocal)
- @c.association_reflection(:c).reciprocal.should == :@xx
+ @c.association_reflection(:c).reciprocal.should == :xx
end
it "should figure out the reciprocal if the :reciprocal value is not present" do
class ParParent < Sequel::Model; end
class ParParentTwo < Sequel::Model; end
@@ -53,16 +53,16 @@
ParParentTwo.one_to_many :par_parents
ParParent.many_to_many :par_parent_threes
ParParentThree.many_to_many :par_parents
ParParent.association_reflection(:par_parent_two).should_not include(:reciprocal)
- ParParent.association_reflection(:par_parent_two).reciprocal.should == :@par_parents
+ ParParent.association_reflection(:par_parent_two).reciprocal.should == :par_parents
ParParentTwo.association_reflection(:par_parents).should_not include(:reciprocal)
- ParParentTwo.association_reflection(:par_parents).reciprocal.should == :@par_parent_two
+ ParParentTwo.association_reflection(:par_parents).reciprocal.should == :par_parent_two
ParParent.association_reflection(:par_parent_threes).should_not include(:reciprocal)
- ParParent.association_reflection(:par_parent_threes).reciprocal.should == :@par_parents
+ ParParent.association_reflection(:par_parent_threes).reciprocal.should == :par_parents
ParParentThree.association_reflection(:par_parents).should_not include(:reciprocal)
- ParParentThree.association_reflection(:par_parents).reciprocal.should == :@par_parent_threes
+ ParParentThree.association_reflection(:par_parents).reciprocal.should == :par_parent_threes
end
end
describe Sequel::Model::Associations::AssociationReflection, "#select" do
before do