You could rewrite this as:

```ruby
def stubbed_file_manager
  double('FileManager', generate: nil)
end
```