Sha256: 3f7fdf1419a4bc26960f558a567c6ecb183bdab52f879567500f7641ca605a74

Contents?: true

Size: 525 Bytes

Versions: 5

Compression:

Stored size: 525 Bytes

Contents

require 'pathname'
require 'set'
require 'rubygems'
begin
  require 'ruby-debug'
rescue LoadError, RuntimeError
end

class Object
  def self.metaclass
    (class << self; self; end)
  end
end

def reset_phocused_classes(*classes)
  Array(classes).flatten.each do |klass|
    klass.metaclass.class_eval do
      class_variable_set(:@@__focused,    false )
      class_variable_set(:@@__focus_next, false )
      class_variable_set(:@@__test_methods,  {} )
    end
  end
end

def reset_phocus
  Phocus.method_pattern = nil
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mynyml-phocus-0.9.4 test/test_helper.rb
mynyml-phocus-0.9.8 test/test_helper.rb
mynyml-phocus-0.9.9 test/test_helper.rb
mynyml-phocus-1.0 test/test_helper.rb
phocus-1.0 test/test_helper.rb