evilution 0.22.2 → 0.22.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a90c882fed4185cf1514efbe1c560e05555efa19a749201e81d9287a65fefef
4
- data.tar.gz: e5c02c5da957d3f9a647fd592b91c4ef82925020d5bb73bd0cde480c1435b26e
3
+ metadata.gz: 64e44290d350e92d6c70bdd99a4a982fa8f0a33cf36062e3fa8f0fa5eea553a8
4
+ data.tar.gz: 31c5dbe19058f73d8c8ae2301649ec44127b1b0487955c8b26b2732e1e69f967
5
5
  SHA512:
6
- metadata.gz: db0a7c3ac58823326a8fc9d23b41dc928d8b1e45f7230c0c18dcdab133a9ec355d25f9303180043d41e9926387d90335920196b9d8651d0040eedb2982fd3b8c
7
- data.tar.gz: 4a5b241452977ddd620ff4a082013b5ebcb2da3860579349ac58a8ac908d15a09862496e5418038eee52327aa46ccd1aac88ce21bb7d7cd2b7f3f931f2750e0f
6
+ metadata.gz: 24d6294bd7f0ef343fb7b3d4573e1217389e3c1e38ac5a4056da51ac3cda0a298dbd33abae25d2bdd927f82f07d0079f1d7b3530e65ff2efb8acc96778631e46
7
+ data.tar.gz: d767b3b380fcfed64b64915e177931d72939d5fbb6a5498676c989daed2f34df969843e1a2c5f04be83e0498bfba2e4198cc65eb04a9904d654db49758904e99
@@ -16,3 +16,4 @@
16
16
  {"id":"int-427bdc14","kind":"field_change","created_at":"2026-04-10T12:40:12.974701482Z","actor":"Denis Kiselev","issue_id":"EV-k6cz","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Merged as PR #659 — capture error_class and error_backtrace in MutationResult, thread through isolators + runner + JSON reporter, log in --verbose"}}
17
17
  {"id":"int-d3431bcd","kind":"field_change","created_at":"2026-04-12T02:57:43.902279367Z","actor":"Denis Kiselev","issue_id":"EV-86l6","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
18
18
  {"id":"int-f409d79d","kind":"field_change","created_at":"2026-04-12T02:57:44.180309214Z","actor":"Denis Kiselev","issue_id":"EV-o28o","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
19
+ {"id":"int-ba5d5d3e","kind":"field_change","created_at":"2026-04-12T03:42:58.408103757Z","actor":"Denis Kiselev","issue_id":"EV-1fq8","extra":{"field":"status","new_value":"closed","old_value":"open","reason":"Closed"}}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.22.4] - 2026-04-12
4
+
5
+ ### Fixed
6
+
7
+ - **`LoadError: cannot load such file -- spec_helper` during preload** — `perform_preload` ran before `ensure_framework_loaded`, so `spec/` was not on `$LOAD_PATH` and `rspec/core` was not loaded when `rails_helper.rb` tried to `require 'spec_helper'` and call `RSpec.configure`; now `prepare_load_path_for_preload` adds `spec/` to `$LOAD_PATH` and loads `rspec/core` before the preload file; errors (e.g. missing `rspec-core` gem) propagate as `ConfigError` with clear context (#669, #673)
8
+
9
+ ## [0.22.3] - 2026-04-12
10
+
11
+ ### Fixed
12
+
13
+ - **`LoadError: cannot load such file -- spec_helper`** — projects with `--require spec_helper` in `.rspec` failed on every mutation because `spec/` was not on `$LOAD_PATH`; RSpec's CLI normally adds it, but evilution calls `RSpec::Core::Runner.run` directly, bypassing the CLI; now adds `spec/` to `$LOAD_PATH` in `ensure_framework_loaded`, `baseline_runner`, and `perform_preload`; also loads `rspec/core` before preloading so that `spec_helper.rb` can use `RSpec.configure` (#669)
14
+
3
15
  ## [0.22.2] - 2026-04-12
4
16
 
5
17
  ### Added
@@ -12,6 +12,8 @@ class Evilution::Integration::RSpec < Evilution::Integration::Base
12
12
  def self.baseline_runner
13
13
  lambda { |spec_file|
14
14
  require "rspec/core"
15
+ spec_dir = File.expand_path("spec")
16
+ $LOAD_PATH.unshift(spec_dir) unless $LOAD_PATH.include?(spec_dir)
15
17
  ::RSpec.reset
16
18
  status = ::RSpec::Core::Runner.run(
17
19
  ["--format", "progress", "--no-color", "--order", "defined", spec_file]
@@ -43,6 +45,7 @@ class Evilution::Integration::RSpec < Evilution::Integration::Base
43
45
 
44
46
  fire_hook(:setup_integration_pre, integration: :rspec)
45
47
  require "rspec/core"
48
+ add_spec_load_path
46
49
  Evilution::Integration::CrashDetector.register_with_rspec
47
50
  @rspec_loaded = true
48
51
  fire_hook(:setup_integration_post, integration: :rspec)
@@ -163,4 +166,12 @@ class Evilution::Integration::RSpec < Evilution::Integration::Base
163
166
  warn "[evilution] No matching spec found for #{file_path}, running full suite. " \
164
167
  "Use --spec to specify the spec file."
165
168
  end
169
+
170
+ # RSpec's CLI adds spec/ to $LOAD_PATH so that `--require spec_helper`
171
+ # (commonly in .rspec) resolves. We call Runner.run directly, bypassing
172
+ # the CLI, so we must replicate this.
173
+ def add_spec_load_path
174
+ spec_dir = File.expand_path("spec")
175
+ $LOAD_PATH.unshift(spec_dir) unless $LOAD_PATH.include?(spec_dir)
176
+ end
166
177
  end
@@ -528,6 +528,7 @@ class Evilution::Runner
528
528
  path = resolve_preload_path
529
529
  return unless path
530
530
 
531
+ prepare_load_path_for_preload
531
532
  require File.expand_path(path)
532
533
  rescue ScriptError, StandardError => e
533
534
  raise Evilution::ConfigError.new(
@@ -536,6 +537,23 @@ class Evilution::Runner
536
537
  )
537
538
  end
538
539
 
540
+ # Preload files (e.g. spec/rails_helper.rb) typically `require 'spec_helper'`
541
+ # which needs spec/ on $LOAD_PATH, and use `RSpec.configure` which needs
542
+ # rspec/core loaded. The RSpec CLI normally sets this up, but evilution
543
+ # calls Runner.run directly.
544
+ def prepare_load_path_for_preload
545
+ spec_dir = File.expand_path(resolve_spec_dir)
546
+ $LOAD_PATH.unshift(spec_dir) unless $LOAD_PATH.include?(spec_dir)
547
+ require "rspec/core" if config.integration == :rspec
548
+ end
549
+
550
+ def resolve_spec_dir
551
+ root = detected_rails_root
552
+ return File.join(root, "spec") if root
553
+
554
+ "spec"
555
+ end
556
+
539
557
  def resolve_preload_path
540
558
  if config.preload.is_a?(String)
541
559
  unless File.file?(config.preload)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Evilution
4
- VERSION = "0.22.2"
4
+ VERSION = "0.22.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: evilution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.2
4
+ version: 0.22.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Kiselev