Displaying 2 results from an estimated 2 matches for "test_documentation".
2006 Sep 29
1
yielding consecutive values
I''m not sure if someone has already addressed this issue, but if not,
here goes.
I need the following behavior:
def test_generate(documentation = ''/test_documentation/'',
destination = ''/destination/'')
yield_results = [''/'', ''filename.yaml'', ''blah.xml'']
Find.expects(:find).with(documentation).yields(lambda
{ yield_results.shift } )
...
end
So I made these change...
2006 Sep 29
2
multiyield
I lied, I don''t actually need different responses each time I call
the method. So the last email of mine is probably worthless.
Instead, I need yield to yield 3 values when I call it once:
(behavior that mimics Find.find)
def test_generate(documentation = ''/test_documentation/'',
destination = ''/destination/'')
Find.expects(:find).with(documentation).multiyield
(''filename.yaml'', ''blah.xml'')
File.expects(:directory?).with(''filename.yaml'')
File.expects(:directory?).with('&...