# File lib/generators/rspec/scaffold/scaffold_generator.rb, line 80 def mock_file_name(hash=nil) if hash method, and_return = hash.to_a.first method = orm_instance.send(method).split('.').last.gsub(/\(.*?\)/, '') "mock_#{file_name}(:#{method} => #{and_return})" else "mock_#{file_name}" end end