add_model_methods (FlexMock::MockContainerHelper)

         # File lib/flexmock/mock_container.rb, line 208
    208:     def add_model_methods(mock, model_class, id)
    209:       container = mock.flexmock_container
    210:       mock.should_receive(
    211:         :id => id,
    212:         :to_params => id.to_s,
    213:         :new_record? => false,
    214:         :class => model_class,
    215:         :errors => container.flexmock("errors", :count => 0))
    216:       # HACK: Ruby 1.9 needs the following lambda so that model_class
    217:       # is correctly bound below.
    218:       lambda { }
    219:       mock.should_receive(:is_a?).with(any).and_return { |other|
    220:         other == model_class
    221:       }
    222:       mock.should_receive(:instance_of?).with(any).and_return { |other|
    223:         other == model_class
    224:       }
    225:       mock.should_receive(:kind_of?).with(any).and_return { |other|
    226:         model_class.ancestors.include?(other)
    227:       }
    228:     end