Dummy implementation for Windows that just fails (Heckle is not supported on Windows)
Methods
public class
public instance
Public class methods
new
(filter, heckle_class=Heckler)
[show source]
# File lib/spec/runner/heckle_runner.rb, line 12 def initialize(filter, heckle_class=Heckler) @filter = filter @heckle_class = heckle_class end
new
(filter)
[show source]
# File lib/spec/runner/heckle_runner_unsupported.rb, line 5 def initialize(filter) raise "Heckle is not supported on Windows or Ruby 1.9" end
Public instance methods
heckle_class_or_module
(class_or_module_name)
[show source]
# File lib/spec/runner/heckle_runner.rb, line 33 def heckle_class_or_module(class_or_module_name) verify_constant(class_or_module_name) pattern = /^#{class_or_module_name}/ classes = [] ObjectSpace.each_object(Class) do |klass| classes << klass if klass.name =~ pattern end classes.each do |klass| klass.instance_methods(false).each do |method_name| heckle = @heckle_class.new(klass.name, method_name, Spec::Runner.options) heckle.validate end end end
heckle_method
(class_name, method_name)
[show source]
# File lib/spec/runner/heckle_runner.rb, line 27 def heckle_method(class_name, method_name) verify_constant(class_name) heckle = @heckle_class.new(class_name, method_name, Spec::Runner.options) heckle.validate end
heckle_with
()
Runs all the example groups held by rspec_options once for each of the methods in the matched classes.
[show source]
# File lib/spec/runner/heckle_runner.rb, line 19 def heckle_with if @filter =~ /(.*)[#\.](.*)/ heckle_method($1, $2) else heckle_class_or_module(@filter) end end
verify_constant
(name)
[show source]
# File lib/spec/runner/heckle_runner.rb, line 49 def verify_constant(name) begin # This is defined in Heckle name.to_class rescue raise "Heckling failed - \"#{name}\" is not a known class or module" end end