summaryrefslogtreecommitdiff
path: root/spec/README.md
diff options
context:
space:
mode:
authorTim Smith <tsmith@mondoo.com>2022-04-17 21:53:43 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-04-19 08:32:37 +0900
commit810b9c344a40802d7736282d86e51d48e8b336a4 (patch)
treefc29a1b466b0f8b2b08b0dc20ea4e76bc61e020a /spec/README.md
parent4299375b9b8b49b02b3d131bfbc621cf28752fae (diff)
Resolve several markedown warnings
- Spaces before and after blocks. - Single spaces after sentences everywhere Signed-off-by: Tim Smith <tsmith@mondoo.com>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5816
Diffstat (limited to 'spec/README.md')
-rw-r--r--spec/README.md12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/README.md b/spec/README.md
index 413b9154c9..6b82f8f06a 100644
--- a/spec/README.md
+++ b/spec/README.md
@@ -5,6 +5,7 @@ spec/bundler is rspec examples for bundler library (`lib/bundler.rb`, `lib/bundl
## Running spec/bundler
To run rspec for bundler:
+
```bash
make test-bundler
```
@@ -37,6 +38,7 @@ which change behavior or are removed. This is necessary for other Ruby implement
to still be able to run the specs and contribute new specs.
For example, change:
+
```ruby
describe "Some spec" do
it "some example" do
@@ -44,7 +46,9 @@ describe "Some spec" do
end
end
```
+
to:
+
```ruby
describe "Some spec" do
ruby_version_is ""..."2.7" do
@@ -64,7 +68,8 @@ end
See `spec/ruby/CONTRIBUTING.md` for more documentation about guards.
To verify specs are compatible with older Ruby versions:
-```
+
+```bash
cd spec/ruby
$RUBY_MANAGER use 2.4.9
../mspec/bin/mspec -j
@@ -73,28 +78,33 @@ $RUBY_MANAGER use 2.4.9
## Running ruby/spec
To run all specs:
+
```bash
make test-spec
```
Extra arguments can be added via `MSPECOPT`.
For instance, to show the help:
+
```bash
make test-spec MSPECOPT=-h
```
You can also run the specs in parallel, which is currently experimental.
It takes around 10s instead of 60s on a quad-core laptop.
+
```bash
make test-spec MSPECOPT=-j
```
To run a specific test, add its path to the command:
+
```bash
make test-spec MSPECOPT=spec/ruby/language/for_spec.rb
```
If ruby trunk is your current `ruby` in `$PATH`, you can also run `mspec` directly:
+
```bash
# change ruby to trunk
ruby -v # => trunk