+ def stub_file_content
+ # For the duration of the current test case, stub file download
+ # content with a randomized (but recognizable) string. Return the
+ # string, the test case can use it in assertions.
+ txt = 'the quick brown fox ' + rand(2**32).to_s
+ @controller.stubs(:file_enumerator).returns([txt])
+ txt
+ end
+