Skip to content

Commit d050682

Browse files
Fix duplicated test names for image pack helpers and use github relative links in docs (#2737)
1 parent 5f70b39 commit d050682

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

docs/assets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ require.context('../images', true)
132132
<% # => <img src="/packs/media/images/calendar-k344a6d59eef8632c9d1.png" /> %>
133133
```
134134

135-
Note you need to add a `media/` prefix (not `/media/`) to any subfolder structure you might have in `app/javascript`. See more examples in the [tests](https://github.com/rails/webpacker/blob/0b86cadb5ed921e2c1538382e72a236ec30a5d97/test/helper_test.rb#L37).
135+
Note you need to add a `media/` prefix (not `/media/`) to any subfolder structure you might have in `app/javascript`. See more examples in the [tests](/test/helper_test.rb#L37).

docs/es6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The comment you see above (`/* webpackChunkName */`) is not arbitrary, it is one
4242
**Warning**: You should not attempt to dynamically load anything from your `packs/` folder. Instead, try to make your `pack` scripts a hub from which you dynamically load `non-pack` scripts.
4343

4444
- [Docs for using magic comments](https://webpack.js.org/api/module-methods/#magic-comments)
45-
- [Docs for configuring `splitChunks` in webpacker](https://github.com/rails/webpacker/blob/master/docs/webpack.md#add-splitchunks-webpack-v4).
45+
- [Docs for configuring `splitChunks` in webpacker](/docs/webpack.md#add-splitchunks-webpack-v4).
4646
- [Docs for using dynamic `import()`](https://webpack.js.org/guides/code-splitting#dynamic-imports).
4747

4848
## Module import vs require()

docs/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ config.public_file_server.enabled = true
140140
Webpacker ships with three javascript configuration files: `test.js`,
141141
`development.js`, and `production.js`. The `NODE_ENV` environment
142142
variable determines which config will be used. `NODE_ENV` is
143-
independent of `RAILS_ENV` and is set to `development` by [default](https://github.com/rails/webpacker/blob/bf278f9787704ed0f78038ad7d36c008abc2edfd/lib/install/bin/webpack#L4).
143+
independent of `RAILS_ENV` and is set to `development` by [default](/lib/install/bin/webpack#L4).
144144
This means that `rails test` or `rspec` will use `development.js`
145145
by default, _not_ `test.js`.
146146

test/helper_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ def test_asset_pack_url
3434
end
3535
end
3636

37-
def test_asset_pack_path
37+
def test_image_pack_path
3838
assert_equal "/packs/application-k344a6d59eef8632c9d1.png", image_pack_path("application.png")
3939
assert_equal "/packs/media/images/image-c38deda30895059837cf.jpg", image_pack_path("image.jpg")
4040
assert_equal "/packs/media/images/image-c38deda30895059837cf.jpg", image_pack_path("media/images/image.jpg")
4141
assert_equal "/packs/media/images/nested/image-c38deda30895059837cf.jpg", image_pack_path("nested/image.jpg")
4242
assert_equal "/packs/media/images/nested/image-c38deda30895059837cf.jpg", image_pack_path("media/images/nested/image.jpg")
4343
end
4444

45-
def test_asset_pack_url
45+
def test_image_pack_url
4646
assert_equal "https://example.com/packs/application-k344a6d59eef8632c9d1.png", image_pack_url("application.png")
4747
assert_equal "https://example.com/packs/media/images/image-c38deda30895059837cf.jpg", image_pack_url("image.jpg")
4848
assert_equal "https://example.com/packs/media/images/image-c38deda30895059837cf.jpg", image_pack_url("media/images/image.jpg")

0 commit comments

Comments
 (0)