class Rspec::Generators::ScaffoldGenerator

def stub_or_should_chain(mode, chain)

def stub_or_should_chain(mode, chain)
  receiver, method = chain.split(".")
  method.gsub!(/\((.*?)\)/, '')
  response = "#{receiver}.#{mode}(:#{method})"
  response << ".with(#{$1})" unless $1.blank?
  response
end