mocha 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +2 -2
- data/RELEASE.md +18 -0
- data/Rakefile +22 -2
- data/lib/mocha/deprecation.rb +1 -1
- data/lib/mocha/stubbed_method.rb +2 -1
- data/lib/mocha/version.rb +1 -1
- data/mise.toml +2 -0
- metadata +4 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 44d35f56fc0395b34a514c91a44a914ac782a500a4426db9e7c00aea8ae66c96
|
|
4
|
+
data.tar.gz: 2be9168ce81c71de23b3ba15593184274098938bdad1108226231c3a70fdb172
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2fe09345542097c73fdc4594ed43d6d737b5927dd29672b79e1d94fce9550ab580c38d0855524eb193eed9b7969078e6e2ad62f11a78156e48288d27b907c78
|
|
7
|
+
data.tar.gz: f17bfeb0fdc2ba83a65e69f515094c00da41b25de979b5bd75767b235fd9cc0e086673a7807d0b895474792a4760e81283b3bc0ba980e67899870f84c9dd638c
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -330,7 +330,7 @@ See this [list of contributors](https://github.com/freerange/mocha/graphs/contri
|
|
|
330
330
|
```bash
|
|
331
331
|
$ MOCHA_GENERATE_DOCS=true bundle install
|
|
332
332
|
|
|
333
|
-
$ MOCHA_GENERATE_DOCS=true rake docs
|
|
333
|
+
$ MOCHA_GENERATE_DOCS=true bundle exec rake docs
|
|
334
334
|
```
|
|
335
335
|
* Commit documentation & push to GitHub
|
|
336
336
|
* Sign in to rubygems.org and find API key - https://rubygems.org/profile/edit
|
|
@@ -342,7 +342,7 @@ $ curl -u <email-address> -H 'OTP:<one-time-password>' https://rubygems.org/api/
|
|
|
342
342
|
* Release gem to Rubygems:
|
|
343
343
|
|
|
344
344
|
```bash
|
|
345
|
-
$ rake release
|
|
345
|
+
$ bundle exec rake release
|
|
346
346
|
[runs tests]
|
|
347
347
|
mocha 1.2.0 built to pkg/mocha-1.2.0.gem.
|
|
348
348
|
Tagged v1.2.0.
|
data/RELEASE.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Release Notes
|
|
2
2
|
|
|
3
|
+
## 3.0.2
|
|
4
|
+
|
|
5
|
+
### External changes
|
|
6
|
+
|
|
7
|
+
* Fix `NoMethodError` on deprecation warning - broken since v3.0.0 (#790)
|
|
8
|
+
|
|
9
|
+
### Internal changes
|
|
10
|
+
|
|
11
|
+
* Update commands in release docs to use `bundle exec` (7692c735)
|
|
12
|
+
* Fix `test:performance` rake task for minitest v6 (d925ad27)
|
|
13
|
+
* Fix prism gem install on JRuby (683c27b4)
|
|
14
|
+
* Add Ruby v4.0-rc to CI build matrix and change weekly build to nightly (#777)
|
|
15
|
+
* Add Ruby v4.0 to CI build matrix (6ced2025)
|
|
16
|
+
* Add irb to `Gemfile` to fix warning in Ruby v4 (a0fc7798)
|
|
17
|
+
* Auto-correct `Style/EmptyClassDefinition` violation (9ba0a09f)
|
|
18
|
+
* Ensure every test can run in isolation (be12ef06)
|
|
19
|
+
* Rename `run-fail-fast` CircleCI command -> `run-fail-on-warning` (72fc6fe8)
|
|
20
|
+
|
|
3
21
|
## 3.0.1
|
|
4
22
|
|
|
5
23
|
### External changes
|
data/Rakefile
CHANGED
|
@@ -42,6 +42,25 @@ namespace 'test' do
|
|
|
42
42
|
t.warning = true
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
desc 'Run each test in isolation'
|
|
46
|
+
task 'isolated' do
|
|
47
|
+
test_files = FileList['test/unit/**/*_test.rb', 'test/acceptance/*_test.rb']
|
|
48
|
+
failed_tests = []
|
|
49
|
+
|
|
50
|
+
test_files.each do |test_file|
|
|
51
|
+
puts "\n=== Running #{test_file} in isolation ==="
|
|
52
|
+
system("ruby -Itest -w #{test_file}") || (failed_tests << test_file)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
if failed_tests.any?
|
|
56
|
+
puts "\n❌ #{failed_tests.size} test file(s) failed:"
|
|
57
|
+
failed_tests.each { |f| puts " - #{f}" }
|
|
58
|
+
exit 1
|
|
59
|
+
else
|
|
60
|
+
puts "\n✅ All #{test_files.size} test files passed in isolation!"
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
45
64
|
namespace 'integration' do
|
|
46
65
|
desc 'Run Minitest integration tests (intended to be run in its own process)'
|
|
47
66
|
Rake::TestTask.new('minitest') do |t|
|
|
@@ -92,15 +111,16 @@ task 'lint' do
|
|
|
92
111
|
end
|
|
93
112
|
end
|
|
94
113
|
|
|
95
|
-
def benchmark_test_case(klass, iterations)
|
|
114
|
+
def benchmark_test_case(klass, iterations) # rubocop:disable Metrics/AbcSize
|
|
96
115
|
require 'benchmark'
|
|
97
116
|
require 'mocha/detection/minitest'
|
|
98
117
|
|
|
99
118
|
if defined?(Minitest)
|
|
100
119
|
minitest_version = Gem::Version.new(Mocha::Detection::Minitest.version)
|
|
101
120
|
if Gem::Requirement.new('>= 5.0.0').satisfied_by?(minitest_version)
|
|
121
|
+
run_method = Gem::Requirement.new('>= 6.0.0').satisfied_by?(minitest_version) ? :run_suite : :run
|
|
102
122
|
Minitest.seed = 1
|
|
103
|
-
result = Benchmark.realtime { iterations.times { |_i| klass.
|
|
123
|
+
result = Benchmark.realtime { iterations.times { |_i| klass.public_send(run_method, Minitest::CompositeReporter.new) } }
|
|
104
124
|
Minitest::Runnable.runnables.delete(klass)
|
|
105
125
|
result
|
|
106
126
|
else
|
data/lib/mocha/deprecation.rb
CHANGED
data/lib/mocha/stubbed_method.rb
CHANGED
data/lib/mocha/version.rb
CHANGED
data/mise.toml
ADDED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mocha
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Mead
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: ruby2_keywords
|
|
@@ -133,6 +132,7 @@ files:
|
|
|
133
132
|
- lib/mocha/thrown_object.rb
|
|
134
133
|
- lib/mocha/version.rb
|
|
135
134
|
- lib/mocha/yield_parameters.rb
|
|
135
|
+
- mise.toml
|
|
136
136
|
- mocha.gemspec
|
|
137
137
|
homepage: https://mocha.jamesmead.org
|
|
138
138
|
licenses:
|
|
@@ -146,7 +146,6 @@ metadata:
|
|
|
146
146
|
homepage_uri: https://mocha.jamesmead.org
|
|
147
147
|
source_code_uri: https://github.com/freerange/mocha
|
|
148
148
|
rubygems_mfa_required: 'true'
|
|
149
|
-
post_install_message:
|
|
150
149
|
rdoc_options: []
|
|
151
150
|
require_paths:
|
|
152
151
|
- lib
|
|
@@ -161,8 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
161
160
|
- !ruby/object:Gem::Version
|
|
162
161
|
version: '0'
|
|
163
162
|
requirements: []
|
|
164
|
-
rubygems_version:
|
|
165
|
-
signing_key:
|
|
163
|
+
rubygems_version: 4.0.3
|
|
166
164
|
specification_version: 4
|
|
167
165
|
summary: Mocking and stubbing library
|
|
168
166
|
test_files: []
|