Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random typos #13543

Merged
merged 1 commit into from
May 7, 2024
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: 1 addition & 1 deletion lib/elixir/pages/getting-started/module-attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ defmodule MyTest do
end
```

In the example above, `ExUnit` stores the value of `async: true` in a module attribute to change how the module is compiled. Tags also work as annotations and they can be supplied multiple times, thanks to Elixir's ability to [accumulate attribute](`Module.register_attribute/3`). Then yuou can use tags to setup and filter tests, such as avoiding executing Unix specific tests while running your test suite on Windows.
In the example above, `ExUnit` stores the value of `async: true` in a module attribute to change how the module is compiled. Tags also work as annotations and they can be supplied multiple times, thanks to Elixir's ability to [accumulate attribute](`Module.register_attribute/3`). Then you can use tags to setup and filter tests, such as avoiding executing Unix specific tests while running your test suite on Windows.

To fully understand how ExUnit works, we'd need macros, so we will revisit this pattern in the Meta-programming guide and learn how to use module attributes as storage for custom annotations.

Expand Down
4 changes: 2 additions & 2 deletions lib/elixir/test/elixir/kernel/errors_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ defmodule Kernel.ErrorsTest do
assert_compile_error(
["nofile:2:7: ", "implementation not provided for predefined def foo/0"],
~c"""
defmodule Kernel.ErrorsTest.FunctionWithoutDefition do
defmodule Kernel.ErrorsTest.FunctionWithoutDefinition do
def foo
end
"""
Expand Down Expand Up @@ -176,7 +176,7 @@ defmodule Kernel.ErrorsTest do
assert_compile_error(
["nofile:2:12: ", "implementation not provided for predefined defmacro foo/1"],
~c"""
defmodule Kernel.ErrorsTest.GuardWithoutDefition do
defmodule Kernel.ErrorsTest.GuardWithoutDefinition do
defguard foo(bar)
end
"""
Expand Down