search for: internal_array

Displaying 2 results from an estimated 2 matches for "internal_array".

2007 Jun 11
2
DelegateClass fails
...6]) myclass.should be_large end end ############################################################ # rspec should work on DelegateClasses. Not sure how... ############################################################ class DelegateKlass < DelegateClass(Array) def initialize(array) @internal_array = array super(@internal_array) end def large? @internal_array.size >= 5 end end =begin # will work if this code is available. class Array def large? self.size >= 5 end end =end describe DelegateKlass, "delegate class fails" do it ''does not work...
2007 Oct 19
27
Assumption tests
Hi all, I''ve been thinking about the whole validator/relationship speccing issue, and I came up with a suggestion, which I''d love to get some feedback on. The full article is available at http://www.inter-sections.net/ 2007/10/19/what-to-test-and-specify-and-where-to-do-it/ , with the relevant bit being about halfway down, but here''s the gist of it: 1.