Comments (7)
9979 % ruby -e 'pp ARGV' bundle exec rails test test/integration/my_cool_test.rb -n /user registration/
["bundle",
"exec",
"rails",
"test",
"test/integration/my_cool_test.rb",
"-n",
"/user",
"registration/"]
from minitest.
9980 % ruby -e 'pp ARGV' bundle exec rails test test/integration/my_cool_test.rb -n "/user registration/"
["bundle",
"exec",
"rails",
"test",
"test/integration/my_cool_test.rb",
"-n",
"/user registration/"]
from minitest.
9981 % ruby -e 'pp ARGV' bundle exec rails test test/integration/my_cool_test.rb -n /user.registration/
["bundle",
"exec",
"rails",
"test",
"test/integration/my_cool_test.rb",
"-n",
"/user.registration/"]
from minitest.
I tried those ideas, and got it to work when substituting the space in the name with .
.
Both of these work:
bundle exec rails test test/integration/flow_test.rb -n /caregiver.registration/
bundle exec rails test test/integration/flow_test.rb -n "/caregiver.registration/"
LoadError:
bundle exec rails test test/integration/my_cool_test.rb -n /caregiver registration/
No tests run:
bundle exec rails test test/integration/flow_test.rb -n "/caregiver registration/"
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
So, is that the way?... replace spaces in test names with dots (aka any char reg exp)?
from minitest.
you're removing too much output... minitest shows you what arguments it processes in the test output.
So, is that the way?... replace spaces in test names with dots (aka any char reg exp)?
no. it is a way, but isn't the way. If quoting + spaces isn't working, that's not minitest. Try removing bundle exec rails test
and use plain ruby to run:
ruby test/integration/flow_test.rb -n "/caregiver registration/"
from minitest.
no response in a week. closing
from minitest.
I only removed the output because as far as I could tell, there was nothing else in it that hinted at the problem...
Without double-quotes (but still using a space):
bundle exec rails test test/integration/flow_test.rb -n /caregiver registration/
/Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require': cannot load such file -- /Users/meme/Projects/myorg/myrepo/test/integration/flow_test.rb (LoadError)
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/test_unit/runner.rb:50:in `block in load_tests'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/test_unit/runner.rb:50:in `each'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/test_unit/runner.rb:50:in `load_tests'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/test_unit/runner.rb:39:in `run'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/commands/test/test_command.rb:33:in `perform'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/command/base.rb:69:in `perform'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/command.rb:48:in `invoke'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/railties-6.1.7/lib/rails/commands.rb:18:in `<main>'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from /Users/meme/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/bootsnap-1.15.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
from bin/rails:4:in `<main>'
With double-quotes (but still using a space):
bundle exec rails test test/integration/flow_test.rb -n "/caregiver registration/"
Seeding data from file: common
- Creating Riddle Network
- Creating riddle dummy company
Seeding data from common complete!
Seeding data from file: test
Seeding data from test complete!
Run options: -n "/caregiver registration/" --seed 21482
# Running:
Top 0 slowest tests (0.000000 seconds, 0.0% of total time):
[Minitest::CI] Generating test report in JUnit XML format...
Finished in 0.000777s, 0.0000 runs/s, 0.0000 assertions/s.
0 runs, 0 assertions, 0 failures, 0 errors, 0 skips
Coverage report generated for Integration Tests to /Users/meme/Projects/myorg/myrepo/coverage. 2593 / 4853 LOC (53.43%) covered.
Removing bundle exec rails test
and use plain ruby to run:
ruby test/integration/flow_test.rb -n "/caregiver registration/"
<internal:/Users/meme/.rbenv/versions/3.1.3/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file -- test_helper (LoadError)
from <internal:/Users/meme/.rbenv/versions/3.1.3/lib/ruby/3.1.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from test/integration/flow_test.rb:1:in `<main>'
from minitest.
Related Issues (20)
- `TestTask#make_test_cmd` has inadequate escaping HOT 1
- [Feature Request] Running single test and single file in most sophisticated way. HOT 2
- Add mutex_m as a gem dependency HOT 3
- Is it possible to stub the SingletonClassMethods#instance method of a class that includes the Singleton module? HOT 1
- Feature request for Mock#verify to accept a custom message arg HOT 5
- Test doubles in Minitest HOT 2
- Add option for relative path output of test failures HOT 4
- Idea for catching outdated stubs HOT 2
- Raise an exception when no tests are found HOT 2
- Have the changes in the git tag and/or the release on GitHub? HOT 10
- NoMethodError for parallel tests HOT 1
- skip_all option? HOT 2
- No relative test path output if `SyntaxError` is encountered HOT 2
- The added "did you mean" output if your `--name` filter matches nothing breaks the Minitest behaviour for multiple runs of the `Minitest.run` method HOT 6
- Skipped tests while building, "not yet" HOT 6
- Is 5.22.3 tag missing? HOT 2
- -Werror mode? - Turn warnings into errors HOT 4
- minitest/spec doesn't play well with rails in parallel tests HOT 1
- Minitest references Rails in non-Rails code HOT 2
- How do I define asserting helpers? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minitest.