diff --git a/README.md b/README.md
index d0deb83..3b088fe 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,10 @@
[![Lines of Code](http://img.shields.io/badge/loc-480-brightgreen.svg)](http://blog.codinghorror.com/the-best-code-is-no-code-at-all/)
-[![Code Status](https://codeclimate.com/github/hopsoft/micro_test.png)](https://codeclimate.com/github/hopsoft/micro_test)
-[![Dependency Status](https://gemnasium.com/hopsoft/micro_test.png)](https://gemnasium.com/hopsoft/micro_test)
-[![Build Status](https://travis-ci.org/hopsoft/micro_test.png)](https://travis-ci.org/hopsoft/micro_test)
-[![Coverage Status](https://img.shields.io/coveralls/hopsoft/micro_test.svg)](https://coveralls.io/r/hopsoft/micro_test?branch=master)
+[![Code Status](https://codeclimate.com/github/hopsoft/pry-test.png)](https://codeclimate.com/github/hopsoft/pry-test)
+[![Dependency Status](https://gemnasium.com/hopsoft/pry-test.png)](https://gemnasium.com/hopsoft/pry-test)
+[![Build Status](https://travis-ci.org/hopsoft/pry-test.png)](https://travis-ci.org/hopsoft/pry-test)
+[![Coverage Status](https://img.shields.io/coveralls/hopsoft/pry-test.svg)](https://coveralls.io/r/hopsoft/pry-test?branch=master)
-# MicroTest
+# PryTest
#### Speed up your test workflow: `fail` -> `pry` -> `pass`
@@ -15,15 +15,15 @@
* Async test runs
* Works with all major Rubies
-[An important note on debugging test failures with Pry.](https://github.com/hopsoft/micro_test/wiki/Debug-Test-Failures-with-Pry#gemfile-considerations)
+[An important note on debugging test failures with Pry.](https://github.com/hopsoft/pry-test/wiki/Debug-Test-Failures-with-Pry#gemfile-considerations)
## The API
-Everything you need to know about MicroTest's API is outlined here.
+Everything you need to know about PryTest's API is outlined here.
- MicroTest::Test |
+ PryTest::Test |
|
@@ -70,7 +70,7 @@ Everything you need to know about MicroTest's API is outlined here.
The entire public interface is used in this basic example.
```ruby
-class MathTest < MicroTest::Test
+class MathTest < PryTest::Test
before do
# runs before each test method
@@ -89,45 +89,42 @@ end
## Get Started
-MicroTest ships with a demo so you can try it out easily.
+PryTest ships with a demo so you can try it out easily.
```sh
-gem install micro_test
-mt --help
-mt --demo
+gem install pry-test
+pry-test --help
+pry-test --demo
```
Try some advanced features.
```sh
-mt --demo --pry
-mt --demo --async
-mt --demo --formatter doc
+pry-test --demo --pry
+pry-test --demo --async
+pry-test --demo --formatter doc
```
## Testing Your Own Projects
-MicroTest assumes your test directory is located at `PROJECT_ROOT/test`;
+PryTest assumes your test directory is located at `PROJECT_ROOT/test`;
however, this isn't a requirement. You can indicate your test directory location.
```sh
-mt /path/to/test/dir
+pry-test /path/to/test/dir
```
-If you have multiple versions of MicroTest installed,
+If you have multiple versions of PryTest installed,
it's safest to run your tests with `bundle exec`.
```sh
-bundle exec mt /path/to/test/dir
+bundle exec pry-test /path/to/test/dir
```
-MicroTest is small & unobtrusive.
+PryTest is small & unobtrusive.
It plays nice with other test frameworks, & can be introduced to existing projects incrementally.
## Advanced
-[See the wiki](https://github.com/hopsoft/micro_test/wiki)
+[See the wiki](https://github.com/hopsoft/pry-test/wiki)
to troubleshoot or get help with more advanced topics.
-
-*Also, checkout [MicroMock](https://github.com/hopsoft/micro_mock) for a lightweight mocking solution.*
-
diff --git a/Rakefile b/Rakefile
index d8c9dc3..c113453 100644
--- a/Rakefile
+++ b/Rakefile
@@ -4,6 +4,6 @@ task :default => [:test]
desc "Runs the test suite."
task :test do
- exec File.expand_path("../bin/mt", __FILE__)
+ exec File.expand_path("../bin/pry-test", __FILE__)
end
diff --git a/bin/mt b/bin/pry-test
similarity index 62%
rename from bin/mt
rename to bin/pry-test
index 2a450c2..d301a4b 100755
--- a/bin/mt
+++ b/bin/pry-test
@@ -1,21 +1,21 @@
#!/usr/bin/env ruby
require "optparse"
-require_relative "../lib/micro_test"
+require_relative "../lib/pry-test"
-include MicroTest::Color
+include PryTest::Color
# setup the formatters list ---------------------------------------------------
-formatter_names = MicroTest.formatters.map(&:short_name).sort
+formatter_names = PryTest.formatters.map(&:short_name).sort
# setup the options -----------------------------------------------------------
options = {}
parser = OptionParser.new do |opts|
- opts.banner = "MicroTest Usage: mt [options] /path/to/test/dir_or_file"
+ opts.banner = "PryTest Usage: pry-test [options] /path/to/test/dir_or_file"
desc = "Runs tests asynchronously."
opts.on("-a", "--async", desc) { |value| options[:async] = value }
- desc = "Runs the MicroTest test suite and some additional demo tests."
+ desc = "Runs the PryTest test suite and some additional demo tests."
opts.on("--demo", desc) { |value| options[:demo] = value }
desc = "The formatter to use. [#{formatter_names.join(", ")}]"
@@ -26,11 +26,8 @@ parser = OptionParser.new do |opts|
desc = "Stops the test run after the first failure. "
opts.on("--fail-fast", desc) { |value| options[:fail_fast] = value }
- desc = "Starts a PRY session whenever a test fails. "
- opts.on("--pry", desc) { |value| options[:pry] = value }
-
opts.on("-v", "--version", "Show version.") do
- puts "MicroTest #{MicroTest::VERSION}"
+ puts "PryTest #{PryTest::VERSION}"
exit 0
end
@@ -38,31 +35,9 @@ parser = OptionParser.new do |opts|
puts opts
exit 0
end
-
end
parser.parse!
-# apply rules to the options --------------------------------------------------
-if RUBY_ENGINE == "jruby"
- if options[:pry]
- options[:pry] = nil
- puts red("Unfortunately the pry option is not available on jruby")
- puts red("due to a dependency on pry-stack_explorer & binding_of_caller.")
- puts "However, the pry workflow is awesome. Switch to #{green "mri 1.9"} to try it."
- end
-end
-if RUBY_ENGINE == "rbx"
- if options[:pry]
- options[:pry] = nil
- puts red("Unfortunately the pry option is not available on rubinius at this time")
- puts red("due to weird behavior related to pry & pry-stack_explorer.")
- puts "However, the pry workflow is awesome. Switch to #{green "mri 1.9"} to try it."
- end
-end
-if options[:async] && options[:pry]
- options[:pry] = nil
- puts red("Disabling pry while runing in async mode to avoid interleaved pry session chaos.")
-end
ENV["MT_DEMO"] = "true" if options[:demo]
# setup the test path ---------------------------------------------------------
@@ -82,21 +57,23 @@ else
end
# setup the formatter ---------------------------------------------------------
-formatter = MicroTest.formatters.find { |f| f.short_name == options[:formatter] }
+formatter = PryTest.formatters.find { |f| f.short_name == options[:formatter] }
formatter ||= begin
if options[:async]
- MicroTest.formatters.find { |f| f.short_name == "default_async" }
+ PryTest.formatters.find { |f| f.short_name == "default_async" }
else
- MicroTest.formatters.find { |f| f.short_name == "default" }
+ PryTest.formatters.find { |f| f.short_name == "default" }
end
end
# setup the test runner -------------------------------------------------------
-runner = MicroTest::Runner.new(formatter.new, options)
+runner = PryTest::Runner.new(formatter.new, options)
# setup pry -------------------------------------------------------------------
-if options[:pry]
-
+if RUBY_ENGINE == "jruby" || RUBY_ENGINE == "rbx" || options[:async]
+ puts red("Disabling pry when running with: #{RUBY_ENGINE}; #{options.inspect}")
+ exit runner.run
+else
begin
require "pry"
require "pry-stack_explorer"
@@ -123,7 +100,4 @@ if options[:pry]
end
exit Pry.rescue { runner.run }
-else
- exit runner.run
end
-
diff --git a/lib/micro_test.rb b/lib/micro_test.rb
deleted file mode 100644
index 439e116..0000000
--- a/lib/micro_test.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-path = File.expand_path("../micro_test/*.rb", __FILE__)
-Dir[path].each { |file| require file }
-
-path = File.expand_path("../micro_test/formatters/**/*.rb", __FILE__)
-Dir[path].each { |file| require file }
diff --git a/lib/pry-test.rb b/lib/pry-test.rb
new file mode 100644
index 0000000..cd8930f
--- /dev/null
+++ b/lib/pry-test.rb
@@ -0,0 +1,5 @@
+path = File.expand_path("../pry-test/*.rb", __FILE__)
+Dir[path].each { |file| require file }
+
+path = File.expand_path("../pry-test/formatters/**/*.rb", __FILE__)
+Dir[path].each { |file| require file }
diff --git a/lib/micro_test/formatters/base_formatter.rb b/lib/pry-test/formatters/base_formatter.rb
similarity index 95%
rename from lib/micro_test/formatters/base_formatter.rb
rename to lib/pry-test/formatters/base_formatter.rb
index 51ba5ff..0290855 100644
--- a/lib/micro_test/formatters/base_formatter.rb
+++ b/lib/pry-test/formatters/base_formatter.rb
@@ -1,4 +1,4 @@
-module MicroTest
+module PryTest
class << self
def formatters
@@ -14,7 +14,7 @@ class BaseFormatter
class << self
def inherited(subclass)
- MicroTest.formatters << subclass
+ PryTest.formatters << subclass
end
def short_name
diff --git a/lib/micro_test/formatters/color.rb b/lib/pry-test/formatters/color.rb
similarity index 95%
rename from lib/micro_test/formatters/color.rb
rename to lib/pry-test/formatters/color.rb
index c2436ea..5f29d5d 100644
--- a/lib/micro_test/formatters/color.rb
+++ b/lib/pry-test/formatters/color.rb
@@ -1,4 +1,4 @@
-module MicroTest
+module PryTest
module Color
extend self
diff --git a/lib/micro_test/formatters/default_async_formatter.rb b/lib/pry-test/formatters/default_async_formatter.rb
similarity index 90%
rename from lib/micro_test/formatters/default_async_formatter.rb
rename to lib/pry-test/formatters/default_async_formatter.rb
index a32adb7..4c3e345 100644
--- a/lib/micro_test/formatters/default_async_formatter.rb
+++ b/lib/pry-test/formatters/default_async_formatter.rb
@@ -1,7 +1,7 @@
require_relative "base_formatter"
-module MicroTest
- class DefaultAsyncFormatter < MicroTest::BaseFormatter
+module PryTest
+ class DefaultAsyncFormatter < PryTest::BaseFormatter
set_short_name "default_async"
def after_test(test)
diff --git a/lib/micro_test/formatters/default_formatter.rb b/lib/pry-test/formatters/default_formatter.rb
similarity index 84%
rename from lib/micro_test/formatters/default_formatter.rb
rename to lib/pry-test/formatters/default_formatter.rb
index 6bbeb34..7268fed 100644
--- a/lib/micro_test/formatters/default_formatter.rb
+++ b/lib/pry-test/formatters/default_formatter.rb
@@ -1,7 +1,7 @@
require_relative "base_formatter"
-module MicroTest
- class DefaultFormatter < MicroTest::BaseFormatter
+module PryTest
+ class DefaultFormatter < PryTest::BaseFormatter
set_short_name "default"
def before_class(test_class)
diff --git a/lib/micro_test/formatters/template.rb b/lib/pry-test/formatters/template.rb
similarity index 98%
rename from lib/micro_test/formatters/template.rb
rename to lib/pry-test/formatters/template.rb
index 3d3a90e..5c1ebb3 100644
--- a/lib/micro_test/formatters/template.rb
+++ b/lib/pry-test/formatters/template.rb
@@ -1,6 +1,6 @@
require_relative "color"
-module MicroTest
+module PryTest
class Template
include Color
diff --git a/lib/micro_test/formatters/views/default/assert_fail.txt.erb b/lib/pry-test/formatters/views/default/assert_fail.txt.erb
similarity index 100%
rename from lib/micro_test/formatters/views/default/assert_fail.txt.erb
rename to lib/pry-test/formatters/views/default/assert_fail.txt.erb
diff --git a/lib/micro_test/formatters/views/default/class.txt.erb b/lib/pry-test/formatters/views/default/class.txt.erb
similarity index 100%
rename from lib/micro_test/formatters/views/default/class.txt.erb
rename to lib/pry-test/formatters/views/default/class.txt.erb
diff --git a/lib/micro_test/formatters/views/default/suite.txt.erb b/lib/pry-test/formatters/views/default/suite.txt.erb
similarity index 63%
rename from lib/micro_test/formatters/views/default/suite.txt.erb
rename to lib/pry-test/formatters/views/default/suite.txt.erb
index 0505057..5e48f20 100644
--- a/lib/micro_test/formatters/views/default/suite.txt.erb
+++ b/lib/pry-test/formatters/views/default/suite.txt.erb
@@ -1,6 +1,9 @@
--------------------------------------------------------------------------------
-<%= green "#{@context.passed} Passed" -%>, <%= red "#{@context.failed} Failed" -%>
+<%= green "#{@context.passed} Passed" -%>
+<% if @context.failed > 0 -%>
+, <%= red "#{@context.failed} Failed" -%>
+<% end -%>
Finished in <%= yellow @context.duration %> seconds.
--------------------------------------------------------------------------------
diff --git a/lib/micro_test/formatters/views/default/test_fail.txt.erb b/lib/pry-test/formatters/views/default/test_fail.txt.erb
similarity index 100%
rename from lib/micro_test/formatters/views/default/test_fail.txt.erb
rename to lib/pry-test/formatters/views/default/test_fail.txt.erb
diff --git a/lib/micro_test/formatters/views/default/test_pass.txt.erb b/lib/pry-test/formatters/views/default/test_pass.txt.erb
similarity index 100%
rename from lib/micro_test/formatters/views/default/test_pass.txt.erb
rename to lib/pry-test/formatters/views/default/test_pass.txt.erb
diff --git a/lib/micro_test/formatters/views/default_async/test.txt.erb b/lib/pry-test/formatters/views/default_async/test.txt.erb
similarity index 100%
rename from lib/micro_test/formatters/views/default_async/test.txt.erb
rename to lib/pry-test/formatters/views/default_async/test.txt.erb
diff --git a/lib/micro_test/runner.rb b/lib/pry-test/runner.rb
similarity index 89%
rename from lib/micro_test/runner.rb
rename to lib/pry-test/runner.rb
index 8873665..c61f5e2 100644
--- a/lib/micro_test/runner.rb
+++ b/lib/pry-test/runner.rb
@@ -1,7 +1,7 @@
require "os"
require "thread"
-module MicroTest
+module PryTest
class Runner
class << self
attr_accessor :exit
@@ -16,7 +16,7 @@ def initialize(formatter, options={})
end
def run
- test_classes = MicroTest::Test.subclasses.shuffle
+ test_classes = PryTest::Test.subclasses.shuffle
tests = test_classes.map{ |klass| klass.tests }.flatten
formatter.before_suite(test_classes)
start = Time.now
@@ -57,11 +57,11 @@ def run_threads
threads = []
thread_count = OS.cpu_count
thread_count = 2 if thread_count < 2
- puts "MicroTest is running #{thread_count} threads."
+ puts "PryTest is running #{thread_count} threads."
thread_count.times do
threads << Thread.new do
while @tests.empty? == false
- Thread.current.kill if MicroTest::Runner.exit
+ Thread.current.kill if PryTest::Runner.exit
@tests.pop.invoke(@formatter, @options)
end
end
diff --git a/lib/micro_test/test.rb b/lib/pry-test/test.rb
similarity index 87%
rename from lib/micro_test/test.rb
rename to lib/pry-test/test.rb
index 6dc8e08..332c79f 100644
--- a/lib/micro_test/test.rb
+++ b/lib/pry-test/test.rb
@@ -1,8 +1,8 @@
-module MicroTest
+module PryTest
# Superclass for all test classes.
# @example Create a subclass with a test.
- # class SimpleTest < MicroTest::Test
+ # class SimpleTest < PryTest::Test
# test "common sense" do
# assert 1 > 0
# end
@@ -11,19 +11,19 @@ class Test
class << self
# All subclasses of this class.
- # @return [Array]
+ # @return [Array]
def subclasses
@subclasses ||= []
end
# All individual tests defined in this class.
- # @return [Array]
+ # @return [Array]
def tests
@tests ||= []
end
# All files that define subclasses of this class.
- # @note Primarily used in the context of MicroTest::Test.
+ # @note Primarily used in the context of PryTest::Test.
# @example Files are stored in a Hash with the following format.
# {
# "path/to/file1.rb" => ["line 1", "line 2", "line 3", ...],
@@ -68,13 +68,13 @@ def after(what=nil, &block)
# @yield A block that defines the test code.
#
# @example
- # class SimpleTest < MicroTest::Test
+ # class SimpleTest < PryTest::Test
# test "common sense" do
# assert 1 > 0
# end
# end
def test(desc, &block)
- wrapper = MicroTest::TestWrapper.new(self, desc, &block)
+ wrapper = PryTest::TestWrapper.new(self, desc, &block)
wrapper.create_method(:before, &@before) if @before
wrapper.create_method(:after, &@after) if @after
tests << wrapper
diff --git a/lib/micro_test/test_wrapper.rb b/lib/pry-test/test_wrapper.rb
similarity index 89%
rename from lib/micro_test/test_wrapper.rb
rename to lib/pry-test/test_wrapper.rb
index 5338621..f07d76f 100644
--- a/lib/micro_test/test_wrapper.rb
+++ b/lib/pry-test/test_wrapper.rb
@@ -1,6 +1,6 @@
require "monitor"
-module MicroTest
+module PryTest
# A wrapper class for individual tests.
# Exists for the purpose of isolating the test method so it can run in its own thread.
@@ -9,7 +9,7 @@ class TestWrapper
attr_reader :test_class, :desc, :asserts
# Constructor.
- # @param [MicroTest::Test] test_class The test class that defines the test being wrapped.
+ # @param [PryTest::Test] test_class The test class that defines the test being wrapped.
# @param [String] desc The test description.
# @yield The block that defines the test code.
def initialize(test_class, desc, &block)
@@ -33,7 +33,7 @@ def before; end
def after; end
# Runs the test code.
- # @formatter [MicroTest::Formatter] The formatter to use.
+ # @formatter [PryTest::Formatter] The formatter to use.
# @options [Hash]
def invoke(formatter, options={})
reset
@@ -54,7 +54,7 @@ def invoke(formatter, options={})
# @param [Object] value The value to assert.
#
# @example
- # class SimpleTest < MicroTest::Test
+ # class SimpleTest < PryTest::Test
# test "common sense" do
# assert 1 > 0
# end
@@ -63,10 +63,10 @@ def assert(value)
@asserts << assert_info(caller).merge(:value => value)
if !value
- binding.pry(:quiet => true) if @options[:pry]
+ binding.pry(:quiet => true)
# I don't really like the coupling to the runner here
- MicroTest::Runner.exit = true if @options[:fail_fast]
+ PryTest::Runner.exit = true if @options[:fail_fast]
end
value
@@ -120,7 +120,7 @@ def duration
# @return [Hash]
def assert_info(stack)
file_path = stack[0][0, stack[0].index(/:[0-9]+:/)]
- lines = MicroTest::Test.files[file_path]
+ lines = PryTest::Test.files[file_path]
line_num = line_number(stack, 0)
line_index = line_num - 1
line = lines[line_index]
diff --git a/lib/micro_test/version.rb b/lib/pry-test/version.rb
similarity index 58%
rename from lib/micro_test/version.rb
rename to lib/pry-test/version.rb
index e7fd837..a7cc47f 100644
--- a/lib/micro_test/version.rb
+++ b/lib/pry-test/version.rb
@@ -1,3 +1,3 @@
-module MicroTest
+module PryTest
VERSION = "0.5.0"
end
diff --git a/micro_test.gemspec b/pry-test.gemspec
similarity index 80%
rename from micro_test.gemspec
rename to pry-test.gemspec
index 5d0cb1a..420d94d 100644
--- a/micro_test.gemspec
+++ b/pry-test.gemspec
@@ -1,10 +1,10 @@
-require File.expand_path("../lib/micro_test/version", __FILE__)
+require File.expand_path("../lib/pry-test/version", __FILE__)
Gem::Specification.new do |spec|
- spec.name = "micro_test"
- spec.version = MicroTest::VERSION
+ spec.name = "pry-test"
+ spec.version = PryTest::VERSION
spec.license = "MIT"
- spec.homepage = "https://github.com/hopsoft/micro_test"
+ spec.homepage = "https://github.com/hopsoft/pry-test"
spec.summary = "Speed up your test workflow: fail -> pry -> pass"
spec.description = "Speed up your test workflow: fail -> pry -> pass"
@@ -32,5 +32,5 @@ Gem::Specification.new do |spec|
"[A-Z].*"
]
spec.test_files = Dir["test/**/*.rb"]
- spec.executables << "mt"
+ spec.executables << "pry-test"
end
diff --git a/test/color_test.rb b/test/color_test.rb
index 15df3c5..31dd99b 100644
--- a/test/color_test.rb
+++ b/test/color_test.rb
@@ -1,44 +1,45 @@
unless ENV["MT_DEMO"]
require_relative "test_helper"
- class ColorTest < MicroTest::Test
+ class ColorTest < PryTest::Test
class Crayon
- include MicroTest::Color
+ include PryTest::Color
end
CRAYON = Crayon.new
test "red" do
- assert MicroTest::Color.red("foo") == "\e[31mfoo\e[0m"
+ assert false
+ assert PryTest::Color.red("foo") == "\e[31mfoo\e[0m"
assert ColorTest::CRAYON.red("foo") == "\e[31mfoo\e[0m"
end
test "green" do
- assert MicroTest::Color.green("foo") == "\e[32mfoo\e[0m"
+ assert PryTest::Color.green("foo") == "\e[32mfoo\e[0m"
assert ColorTest::CRAYON.green("foo") == "\e[32mfoo\e[0m"
end
test "yellow" do
- assert MicroTest::Color.yellow("foo") == "\e[33mfoo\e[0m"
+ assert PryTest::Color.yellow("foo") == "\e[33mfoo\e[0m"
assert ColorTest::CRAYON.yellow("foo") == "\e[33mfoo\e[0m"
end
test "blue" do
- assert MicroTest::Color.blue("foo") == "\e[34mfoo\e[0m"
+ assert PryTest::Color.blue("foo") == "\e[34mfoo\e[0m"
assert ColorTest::CRAYON.blue("foo") == "\e[34mfoo\e[0m"
end
test "magenta" do
- assert MicroTest::Color.magenta("foo") == "\e[35mfoo\e[0m"
+ assert PryTest::Color.magenta("foo") == "\e[35mfoo\e[0m"
assert ColorTest::CRAYON.magenta("foo") == "\e[35mfoo\e[0m"
end
test "cyan" do
- assert MicroTest::Color.cyan("foo") == "\e[36mfoo\e[0m"
+ assert PryTest::Color.cyan("foo") == "\e[36mfoo\e[0m"
assert ColorTest::CRAYON.cyan("foo") == "\e[36mfoo\e[0m"
end
test "white" do
- assert MicroTest::Color.white("foo") == "\e[37mfoo\e[0m"
+ assert PryTest::Color.white("foo") == "\e[37mfoo\e[0m"
assert ColorTest::CRAYON.white("foo") == "\e[37mfoo\e[0m"
end
diff --git a/test/cpu_latency_test.rb b/test/cpu_latency_test.rb
index 7508a1c..b28913a 100644
--- a/test/cpu_latency_test.rb
+++ b/test/cpu_latency_test.rb
@@ -1,7 +1,7 @@
if ENV["MT_DEMO"]
require_relative "test_helper"
- class TestCPULatency < MicroTest::Test
+ class TestCPULatency < PryTest::Test
before do
@count = 35
diff --git a/test/fail_test.rb b/test/fail_test.rb
index 35e6483..b7753b1 100644
--- a/test/fail_test.rb
+++ b/test/fail_test.rb
@@ -1,7 +1,7 @@
if ENV["MT_DEMO"]
require_relative "test_helper"
- class Fail < MicroTest::Test
+ class Fail < PryTest::Test
before do
@var = "fubar"
diff --git a/test/io_latency_test.rb b/test/io_latency_test.rb
index 6bbbf51..ffe4c77 100644
--- a/test/io_latency_test.rb
+++ b/test/io_latency_test.rb
@@ -1,7 +1,7 @@
if ENV["MT_DEMO"]
require_relative "test_helper"
- class TestIOLatency < MicroTest::Test
+ class TestIOLatency < PryTest::Test
test "sleep 1 sec" do
sleep 1
diff --git a/test/runner_test.rb b/test/runner_test.rb
index 67a7490..2568992 100644
--- a/test/runner_test.rb
+++ b/test/runner_test.rb
@@ -1,10 +1,10 @@
unless ENV["MT_DEMO"]
require_relative "test_helper"
- class TestRunner < MicroTest::Test
+ class TestRunner < PryTest::Test
before do
- @runner = MicroTest::Runner.new(MicroTest::DefaultFormatter.new)
+ @runner = PryTest::Runner.new(PryTest::DefaultFormatter.new)
end
test ".running" do
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 74d393f..4cc950c 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,4 +1,4 @@
require "coveralls"
Coveralls.wear!
-require_relative "../lib/micro_test"
+require_relative "../lib/pry-test"
diff --git a/test/test_test.rb b/test/test_test.rb
index d1fd35a..3e99ab3 100644
--- a/test/test_test.rb
+++ b/test/test_test.rb
@@ -1,7 +1,7 @@
unless ENV["MT_DEMO"]
require_relative "test_helper"
- class TestTest < MicroTest::Test
+ class TestTest < PryTest::Test
before do
@test_test = TestTest.clone
@@ -30,7 +30,7 @@ class TestTest < MicroTest::Test
test "stores tests" do
assert @Example.tests.is_a?(Array)
assert @Example.tests.length == 1
- assert @Example.tests.first.is_a?(MicroTest::TestWrapper)
+ assert @Example.tests.first.is_a?(PryTest::TestWrapper)
end
test "stores files" do
@@ -62,7 +62,7 @@ class TestTest < MicroTest::Test
t = lambda {}
@Example.send :test, :add_a_test, &t
assert @Example.tests.length == 2
- assert @Example.tests.last.is_a?(MicroTest::TestWrapper)
+ assert @Example.tests.last.is_a?(PryTest::TestWrapper)
assert @Example.tests.last.desc == :add_a_test
end
diff --git a/test/test_wrapper_test.rb b/test/test_wrapper_test.rb
index 982b3ee..f07eb6a 100644
--- a/test/test_wrapper_test.rb
+++ b/test/test_wrapper_test.rb
@@ -1,12 +1,12 @@
unless ENV["MT_DEMO"]
require_relative "test_helper"
- class TestWrapperTest < MicroTest::Test
+ class TestWrapperTest < PryTest::Test
test ".new" do
desc = "test_#{rand(999**10)}"
meth = lambda { ".new" }
- t = MicroTest::TestWrapper.new(TestWrapperTest, desc, &meth)
+ t = PryTest::TestWrapper.new(TestWrapperTest, desc, &meth)
assert t.desc == desc
assert t.test == ".new"
assert t.passed?