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)
- test
- MFA is required on your rubygems.org account HOT 3
- Duplicate class names cause issues HOT 3
- How to ignore extra kwargs in expect? HOT 1
- Mock#expect unexpected behavior with Hash argument HOT 1
- MiniTest::Mock and the debug gem HOT 1
- Why "Use assert_nil if expecting nil"? HOT 2
- Create setup array equivalent to `TEARDOWN_METHODS`? HOT 5
- wrong number of arguments (given 2, expected 1) (ArgumentError) using Mock with delegator HOT 3
- Unable to stub the aliased module method (to catch its call) HOT 1
- TypeError (no implicit conversion of nil into Integer) HOT 2
- A reporter added to the end of a CompositeReporter doesn't appear to be getting called HOT 10
- Minitest with JRuby HOT 7
- Minitest stub implementation changes a method's lookup to be on metaclass always
- #assert_all support HOT 4
- How to run skipped test? if I don't want to comment "skip" HOT 5
- NoMethodError: undefined method 'stubs'; alternative to nesting with `stub` HOT 2
- JUnitReporter seems to silence seed HOT 2
- Make Minitest::Result extendable HOT 6
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.