nix-archive-1(type directoryentry(namelibnode(type directoryentry(namerubynode(type directoryentry(name vendor_rubynode(type directoryentry(name build_infonode(type directory))entry(namecachenode(type directory))entry(namedocnode(type directoryentry(nameminitest-power_assert-0.3.1node(type directoryentry(namerinode(type directoryentry(nameMinitestnode(type directoryentry(name PowerAssertnode(type directoryentry(name Assertionsnode(type directoryentry(nameContextExtensionnode(type directoryentry(namecdesc-ContextExtension.rinode(typeregularcontentsU:RDoc::NormalModule[iI"ContextExtension:ETI"8Minitest::PowerAssert::Assertions::ContextExtension;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[I" to_s;TI"!lib/minitest/power_assert.rb;T[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ I"&Minitest::PowerAssert::Assertions;TcRDoc::NormalModule))entry(name to_s-i.rinode(typeregularcontents%U:RDoc::AnyMethod[iI" to_s:ETI"=Minitest::PowerAssert::Assertions::ContextExtension#to_s;TF: publico:RDoc::Markup::Document: @parts[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@ FI"ContextExtension;TcRDoc::NormalModule00))))entry(name assert-i.rinode(typeregularcontents.U:RDoc::AnyMethod[iI" assert:ETI"-Minitest::PowerAssert::Assertions#assert;TF: publico:RDoc::Markup::Document: @parts[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(test = nil, msg = nil, &block);T@ TI"Assertions;TcRDoc::NormalModule00))entry(namecdesc-Assertions.rinode(typeregularcontentsU:RDoc::NormalModule[iI"Assertions:ETI"&Minitest::PowerAssert::Assertions;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[I" assert;TI"!lib/minitest/power_assert.rb;T[I" refute;T@"[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ I"Minitest::PowerAssert;TcRDoc::NormalModule))entry(name refute-i.rinode(typeregularcontents.U:RDoc::AnyMethod[iI" refute:ETI"-Minitest::PowerAssert::Assertions#refute;TF: publico:RDoc::Markup::Document: @parts[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below000[I"$(test = nil, msg = nil, &block);T@ TI"Assertions;TcRDoc::NormalModule00))))entry(namecdesc-PowerAssert.rinode(typeregularcontents,U:RDoc::NormalModule[iI"PowerAssert:ETI"Minitest::PowerAssert;T0o:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I")lib/minitest/power_assert/version.rb;T; 0; 0; 0[[U:RDoc::Constant[iI" VERSION;TI"#Minitest::PowerAssert::VERSION;T: public0o;;[; @; 0@@cRDoc::NormalModule0[[[I" class;T[[; [[:protected[[: private[[I" instance;T[[; [[; [[;[[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ @I" Minitest;T@))))entry(nameTestnode(type directoryentry(name cdesc-Test.rinode(typeregularcontentsU:RDoc::NormalClass[iI" Test:ETI"Minitest::Test;TI" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below0; 0; 0[[[[I"PowerAssert::Assertions;To;;[; @; 0I"!lib/minitest/power_assert.rb;T[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[@I" Minitest;TcRDoc::NormalModule))))entry(namecdesc-Minitest.rinode(typeregularcontentsU:RDoc::NormalModule[iI" Minitest:ET@0o:RDoc::Markup::Document: @parts[o;;[: @fileI"!lib/minitest/power_assert.rb;T:0@omit_headings_from_table_of_contents_below0o;;[; I")lib/minitest/power_assert/version.rb;T; 0; 0; 0[[[[[I" class;T[[: public[[:protected[[: private[[I" instance;T[[; [[; [[; [[[U:RDoc::Context::Section[i0o;;[; 0; 0[@ @@cRDoc::TopLevel))))entry(namecache.rinode(typeregularcontents>{:ancestors{I"Minitest::Test:ET[I"&Minitest::PowerAssert::Assertions;TI" Object;T:attributes{:class_methods{:c_class_variables{: c_singleton_class_variables{: encodingIu: Encoding UTF-8;F:instance_methods{I"&Minitest::PowerAssert::Assertions;T[I" assert;TI" refute;TI"8Minitest::PowerAssert::Assertions::ContextExtension;T[I" to_s;T: main0: modules[ I" Minitest;TI"Minitest::PowerAssert;T@ I"8Minitest::PowerAssert::Assertions::ContextExtension;TI"Minitest::Test;T: pages[: titleI".minitest-power_assert-0.3.1 Documentation;T))))))))entry(name extensionsnode(type directory))entry(namegemsnode(type directoryentry(nameminitest-power_assert-0.3.1node(type directoryentry(name .gitignorenode(typeregularcontents*.gem *.rbc .bundle .config .yardoc Gemfile.lock InstalledFiles _yardoc coverage doc/ lib/bundler/man pkg rdoc spec/reports test/tmp test/version_tmp tmp vendor *.bundle *.so *.o *.a mkmf.log ))entry(name .travis.ymlnode(typeregularcontentsdist: xenial language: ruby rvm: - 2.2 - 2.3 - 2.4 - 2.5 - 2.6 - 2.7 cache: bundler: true script: - bundle exec rake ))entry(nameBSDLnode(typeregularcontentsCopyright (C) 2014 Hiroshi SHIBATA, All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ))entry(nameCOPYINGnode(typeregularcontents Copyright (C) 2014 Hiroshi SHIBATA, All rights reserved. You can redistribute it and/or modify it under either the terms of the 2-clause BSDL (see the file BSDL), or the conditions below: 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. b) use the modified software only within your corporation or organization. c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author. 3. You may distribute the software in object code or binary form, provided that you do at least ONE of the following: a) distribute the binaries and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. b) accompany the distribution with the machine-readable source of the software. c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author. 4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under these terms. For the list of those files and their copying conditions, see the file LEGAL. 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ))entry(nameGemfilenode(typeregularcontentsjsource 'https://rubygems.org' # Specify your gem's dependencies in minitest-power_assert.gemspec gemspec ))entry(name README.mdnode(typeregularcontents\# Minitest::PowerAssert [![Gem Version](https://badge.fury.io/rb/minitest-power_assert.svg)](https://rubygems.org/gems/minitest-power_assert) [![Build Status](https://travis-ci.org/hsbt/minitest-power_assert.svg)](https://travis-ci.org/hsbt/minitest-power_assert) A Power Assert implementation for Minitest. This gem is inspired by the [test-unit-power_assert](https://github.com/k-tsj/test-unit-power_assert) gem. ## Installation Add this line to your application's Gemfile: gem 'minitest-power_assert' And then execute: $ bundle Or install it yourself as: $ gem install minitest-power_assert ## Usage see [testcase](https://github.com/hsbt/minitest-power_assert/blob/master/test/test_power_assert.rb) ### Basic Testcase The `minitest-power_assert` gem overrides the `#assert` method. In order to use power assert, call the assert method with a block: ```ruby class TestPowerAssert < Minitest::Test def test_power_assert_failed assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } end end ``` If the test above fails, it displays a test result with detailed information about variables: ```shell 1) Failure: TestPowerAssert#test_power_assert_failed [test/test_power_assert.rb:10]: assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } | | | | | | | | | Array | | | [1, 2, 3] | | # | 3 String ``` ## Contributing 1. Fork it ( https://github.com/hsbt/minitest-power_assert/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request ))entry(nameRakefilenode(typeregularcontentsrequire 'rake' require 'rake/testtask' require "bundler/gem_tasks" Rake::TestTask.new do |t| t.test_files = Dir.glob('test/**/test_*.rb') end task :default => :test ))entry(namelibnode(type directoryentry(nameminitestnode(type directoryentry(name power_assertnode(type directoryentry(name version.rbnode(typeregularcontentsEmodule Minitest module PowerAssert VERSION = "0.3.1" end end ))))entry(namepower_assert.rbnode(typeregularcontentsurequire "minitest/power_assert/version" require 'minitest' require 'power_assert' module Minitest module PowerAssert module Assertions def assert(test = nil, msg = nil, &block) if block_given? ::PowerAssert.start(block, assertion_method: __method__) do |pa| super pa.yield, pa.extend(ContextExtension) end else super end end def refute(test = nil, msg = nil, &block) if block_given? ::PowerAssert.start(block, assertion_method: __method__) do |pa| super pa.yield, pa.extend(ContextExtension) end else super end end module ContextExtension def to_s message end end private_constant :ContextExtension end end class Test include PowerAssert::Assertions end end ))))entry(nameminitest-power_assert.rbnode(typeregularcontents require 'minitest/power_assert' ))))entry(nameminitest-power_assert.gemspecnode(typeregularcontents%# -*- encoding: utf-8 -*- # stub: minitest-power_assert 0.3.1 ruby lib Gem::Specification.new do |s| s.name = "minitest-power_assert".freeze s.version = "0.3.1" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["SHIBATA Hiroshi".freeze] s.date = "2020-01-30" s.description = "Power Assert for Minitest.".freeze s.email = ["hsbt@ruby-lang.org".freeze] s.files = [".gitignore".freeze, ".travis.yml".freeze, "BSDL".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "lib/minitest-power_assert.rb".freeze, "lib/minitest/power_assert.rb".freeze, "lib/minitest/power_assert/version.rb".freeze, "minitest-power_assert.gemspec".freeze, "test/test_power_assert.rb".freeze] s.homepage = "https://github.com/hsbt/minitest-power_assert".freeze s.licenses = ["2-clause BSDL".freeze] s.rubygems_version = "3.3.26".freeze s.summary = "Power Assert for Minitest.".freeze s.test_files = ["test/test_power_assert.rb".freeze] if s.respond_to? :specification_version then s.specification_version = 4 end if s.respond_to? :add_runtime_dependency then s.add_runtime_dependency(%q.freeze, [">= 0"]) s.add_runtime_dependency(%q.freeze, [">= 1.1"]) s.add_development_dependency(%q.freeze, [">= 0"]) else s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 1.1"]) s.add_dependency(%q.freeze, [">= 0"]) end end ))entry(nametestnode(type directoryentry(nametest_power_assert.rbnode(typeregularcontentsVrequire 'minitest' require "minitest/autorun" require 'minitest/power_assert' class TestPowerAssert < Minitest::Test def test_power_assert assert { true } end def test_power_assert_failed assert { "0".class == "3".to_i.times.map {|i| i + 1 }.class } rescue Minitest::Assertion => e assert_match(/Array/, e.message) assert_match(/\[1, 2, 3\]/, e.message) assert_match(/#/, e.message) assert_match(/String/, e.message) end def test_assert assert true end def test_assert_failed assert "0".class == "3".to_i.times.map {|i| i + 1 }.class rescue Minitest::Assertion => e assert_match(/Expected false to be truthy./, e.message) end def test_power_refute refute { false } end def test_power_refute_failed refute { "0".class == String } rescue Minitest::Assertion => e assert_match(/String/, e.message) end def test_refute refute false end def test_refute_failed refute "0".class == String rescue Minitest::Assertion => e assert_match(/Expected true to not be truthy./, e.message) end end ))))))))entry(namepluginsnode(type directory))entry(namespecificationsnode(type directoryentry(name#minitest-power_assert-0.3.1.gemspecnode(typeregularcontents# -*- encoding: utf-8 -*- # stub: minitest-power_assert 0.3.1 ruby lib Gem::Specification.new do |s| s.name = "minitest-power_assert".freeze s.version = "0.3.1" s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.require_paths = ["lib".freeze] s.authors = ["SHIBATA Hiroshi".freeze] s.date = "2020-01-30" s.description = "Power Assert for Minitest.".freeze s.email = ["hsbt@ruby-lang.org".freeze] s.homepage = "https://github.com/hsbt/minitest-power_assert".freeze s.licenses = ["2-clause BSDL".freeze] s.rubygems_version = "3.3.26".freeze s.summary = "Power Assert for Minitest.".freeze s.installed_by_version = "3.3.26" if s.respond_to? :installed_by_version if s.respond_to? :specification_version then s.specification_version = 4 end if s.respond_to? :add_runtime_dependency then s.add_runtime_dependency(%q.freeze, [">= 0"]) s.add_runtime_dependency(%q.freeze, [">= 1.1"]) s.add_development_dependency(%q.freeze, [">= 0"]) else s.add_dependency(%q.freeze, [">= 0"]) s.add_dependency(%q.freeze, [">= 1.1"]) s.add_dependency(%q.freeze, [">= 0"]) end end ))))))))))entry(namesharenode(type directoryentry(namedocnode(type directoryentry(name ruby-minitest-power-assert-0.3.1node(type directoryentry(nameCOPYINGnode(typeregularcontents Copyright (C) 2014 Hiroshi SHIBATA, All rights reserved. You can redistribute it and/or modify it under either the terms of the 2-clause BSDL (see the file BSDL), or the conditions below: 1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. b) use the modified software only within your corporation or organization. c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author. 3. You may distribute the software in object code or binary form, provided that you do at least ONE of the following: a) distribute the binaries and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. b) accompany the distribution with the machine-readable source of the software. c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. d) make other distribution arrangements with the author. 4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under these terms. For the list of those files and their copying conditions, see the file LEGAL. 5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. 6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. )))))))))