Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ only add here if you are working on a PR

### Added

- Rake tasks will prioritize the `PARALLEL_RAILS_ENV` value over the default `test` environment

### Fixed

## 5.3.1 - 2025-07-23
Expand Down
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ TIPS
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
- `export PARALLEL_TEST_PROCESSORS=13` to override default processor count
- `export PARALLEL_TEST_MULTIPLY_PROCESSES=.5` to override default processor multiplier
- `export PARALLEL_RAILS_ENV=environment_name` to override the default `test` environment
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
- [Spring] Add the [spring-commands-parallel-tests](https://github.com/DocSpring/spring-commands-parallel-tests) gem to your `Gemfile` to get `parallel_tests` working with Spring.
- `--first-is-1` will make the first environment be `1`, so you can test while running your full suite.<br/>
Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/tasks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module ParallelTests
module Tasks
class << self
def rails_env
'test'
ENV['PARALLEL_RAILS_ENV'] || 'test'
end

def load_lib
Expand Down
8 changes: 4 additions & 4 deletions spec/parallel_tests/tasks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
end

describe ".rails_env" do
it "should be test" do
it "should be test when nothing was set" do
expect(ParallelTests::Tasks.rails_env).to eq("test")
end

it "should disregard whatever was set" do
ENV["RAILS_ENV"] = "foo"
expect(ParallelTests::Tasks.rails_env).to eq("test")
it "should prioritize the PARALLEL_RAILS_ENV value over the standard" do
ENV["PARALLEL_RAILS_ENV"] = "bar"
expect(ParallelTests::Tasks.rails_env).to eq("bar")
end
end

Expand Down
Loading