Sha256: 8f463671590746de2615b40e3227c369fb5a321a98ecaad15170900f1de6819f

Contents?: true

Size: 1.08 KB

Versions: 9

Compression:

Stored size: 1.08 KB

Contents

module Minitest
  class Runnable
  end
end

class MiniTest
  class Unit
    class TestCase
    end
  end
end

def stub_mini_test_methods
  allow(Minitest::Runnable).to receive(:runnables).and_return([fake_mt5_suite])
  allow(MiniTest::Unit::TestCase).to receive(:test_suite).and_return([fake_mt_old_suite])
end

def fake_runner
  @runner ||= double("Runner", :run => 0)
end

def fake_mt5_suite
  @suite ||= double("TestSuite",
                  :runnable_methods => [test_method],
                  :instance_method => fake_instance_method(test_method))
end

def fake_mt_old_suite
  @suite ||= double("TestSuite",
                  :test_methods => [test_method],
                  :instance_method => fake_instance_method(test_method))
end

def fake_test_method
  "test_method"
end

def fake_special_characters_test_method
  "test_my_test_method?"
end

def fake_instance_method(name=fake_test_method)
  @instance_method ||=  double("InstanceMethod",
                             :source_location => ["path/to/file.rb", 2],
                             :source => "def #{name} \n assert true \n end")
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
zeus-0.17.0 spec/fake_mini_test.rb
zeus-0.16.0 spec/fake_mini_test.rb
zeus-0.15.15.pre spec/fake_mini_test.rb
zeus-0.15.14 spec/fake_mini_test.rb
zeus-0.15.14.pre spec/fake_mini_test.rb
zeus-0.15.13 spec/fake_mini_test.rb
zeus-0.15.13.pre spec/fake_mini_test.rb
zeus-0.15.12 spec/fake_mini_test.rb
zeus-0.15.10 spec/fake_mini_test.rb