minitest-global_expectations-1.0.2/0000755000004100000410000000000015121602662017423 5ustar www-datawww-dataminitest-global_expectations-1.0.2/README.rdoc0000644000004100000410000000166115121602662021235 0ustar www-datawww-data= minitest-global_expectations minitest-global_expectations allows you to keep using simple code in your minitest specs, without having to wrap every single object you are calling an expectation method on with _: # You can use: foo.must_equal 1 # instead of: _(foo).must_equal 1 Calling expectation methods on all objects was supported in Minitest <5.12, was deprecated in Minitest 5.12, and is planned to be removed from Minitest 6. = Installation gem install minitest-global_expectations = Source Code Source code is available on GitHub at https://github.com/jeremyevans/minitest-global_expectations = Usage Just require the library. You can switch requires of +minitest/spec+ to: require 'minitest/global_expectations' Alternatively, if you are requiring +minitest/autorun+, you can switch to: require 'minitest/global_expectations/autorun' = License MIT = Author Jeremy Evans minitest-global_expectations-1.0.2/lib/0000755000004100000410000000000015121602662020171 5ustar www-datawww-dataminitest-global_expectations-1.0.2/lib/minitest/0000755000004100000410000000000015121602662022025 5ustar www-datawww-dataminitest-global_expectations-1.0.2/lib/minitest/global_expectations/0000755000004100000410000000000015121602662026053 5ustar www-datawww-dataminitest-global_expectations-1.0.2/lib/minitest/global_expectations/autorun.rb0000644000004100000410000000010215121602662030066 0ustar www-datawww-datarequire 'minitest/autorun' require 'minitest/global_expectations' minitest-global_expectations-1.0.2/lib/minitest/global_expectations.rb0000644000004100000410000000222615121602662026402 0ustar www-datawww-datarequire 'minitest/spec' # :nocov: module MinitestGlobalExpectations if Minitest::VERSION >= '6' # :nocov: class ::Minitest::Spec def self.current Thread.current[:current_spec] end def initialize name # :nodoc: super Thread.current[:current_spec] = self end end end [ :must_be_empty, :must_equal, :must_be_close_to, :must_be_within_epsilon, :must_include, :must_be_instance_of, :must_be_kind_of, :must_match, :must_be_nil, :must_be, :must_output, :must_raise, :must_respond_to, :must_be_same_as, :must_be_silent, :must_throw, :wont_be_empty, :wont_equal, :wont_be_close_to, :wont_be_within_epsilon, :wont_include, :wont_be_instance_of, :wont_be_kind_of, :wont_match, :wont_be_nil, :wont_be, :wont_respond_to, :wont_be_same_as, ].each do |meth| self.class_eval(<<-EOM, __FILE__, __LINE__ + 1) def #{meth}(*args) Minitest::Expectation.new(self, Minitest::Spec.current).#{meth}(*args) end EOM end ::Object.send(:include, self) end if defined?(Minitest::Expectation) minitest-global_expectations-1.0.2/MIT-LICENSE0000644000004100000410000000202115121602662021052 0ustar www-datawww-dataCopyright (c) 2019 Jeremy Evans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. minitest-global_expectations-1.0.2/minitest-global_expectations.gemspec0000644000004100000410000000414115121602662026650 0ustar www-datawww-data######################################################### # This file has been automatically generated by gem2tgz # ######################################################### # -*- encoding: utf-8 -*- # stub: minitest-global_expectations 1.0.2 ruby lib Gem::Specification.new do |s| s.name = "minitest-global_expectations".freeze s.version = "1.0.2".freeze s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version= s.metadata = { "bug_tracker_uri" => "https://github.com/jeremyevans/minitest-global_expectations/issues", "changelog_uri" => "https://github.com/jeremyevans/minitest-global_expectations/blob/master/CHANGELOG", "mailing_list_uri" => "https://github.com/jeremyevans/minitest-global_expectations/discussions", "source_code_uri" => "https://github.com/jeremyevans/minitest-global_expectations" } if s.respond_to? :metadata= s.require_paths = ["lib".freeze] s.authors = ["Jeremy Evans".freeze] s.date = "1980-01-02" s.description = "minitest-global_expectations allows you to keep using simple code in your\nminitest specs, without having to wrap every single object you are calling\nan expectation method on with an underscore.\n".freeze s.email = "code@jeremyevans.net".freeze s.extra_rdoc_files = ["CHANGELOG".freeze, "MIT-LICENSE".freeze, "README.rdoc".freeze] s.files = ["CHANGELOG".freeze, "MIT-LICENSE".freeze, "README.rdoc".freeze, "lib/minitest/global_expectations.rb".freeze, "lib/minitest/global_expectations/autorun.rb".freeze] s.homepage = "https://github.com/jeremyevans/minitest-global_expectations".freeze s.licenses = ["MIT".freeze] s.rdoc_options = ["--quiet".freeze, "--line-numbers".freeze, "--inline-source".freeze, "--title".freeze, "minitest-global_expectations: add expectation methods to all objects".freeze, "--main".freeze, "README.rdoc".freeze] s.required_ruby_version = Gem::Requirement.new(">= 1.8".freeze) s.rubygems_version = "4.0.2".freeze s.summary = "Support minitest expectation methods for all objects".freeze s.specification_version = 4 s.add_runtime_dependency(%q.freeze, ["> 5".freeze]) end minitest-global_expectations-1.0.2/CHANGELOG0000644000004100000410000000030115121602662020627 0ustar www-datawww-data=== 1.0.2 (2025-12-18) * Work correctly on minitest 6+ (jeremyevans) === 1.0.1 (2019-09-24) * Work correctly on minitest <5.6 (jeremyevans) === 1.0.0 (2019-09-24) * Initial Public Release