File: deleted_source_sample.rb

package info (click to toggle)
ruby-simplecov 0.22.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,500 kB
  • sloc: ruby: 5,550; makefile: 10
file content (15 lines) | stat: -rw-r--r-- 352 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "..", "lib"))
require "simplecov"
SimpleCov.start { command_name "Test" }

dir = __dir__
file = File.join(dir, "generated_buddha.rb")
code = %{
  def kill_the_buddha(z)
    z**z
  end
}
File.open(file, "w") { |f| f.print code }
load file
File.unlink file
raise unless kill_the_buddha(3) == 27