Sha256: 58de8ae178082f570d67f27b22c768e928c685417860da1f3824ca908c261a53
Contents?: true
Size: 779 Bytes
Versions: 7
Compression:
Stored size: 779 Bytes
Contents
# frozen_string_literal: true Given(/^the smelly file 'smelly.rb'/) do contents = <<-EOS.strip_heredoc class AllTheMethods def method_missing(method, *args, &block) message = "I" eval "message = ' did not'" eval "message << ' exist,'" eval "message << ' but now'" eval "message << ' I do.'" self.class.send(:define_method, method) { "I did not exist, but now I do." } self.send(method) end end EOS write_file('smelly.rb', contents) end Given(/^the clean file 'clean.rb'/) do contents = <<-EOS.strip_heredoc # Explanatory comment class Clean def foo; end end EOS write_file('clean.rb', contents) end Given(/^the empty file 'empty.rb'/) do write_file('clean.rb', '') end
Version data entries
7 entries across 7 versions & 1 rubygems