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

Improve MockLogger - level/limited missing method (3) #2369

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andynu
Copy link
Contributor

@andynu andynu commented Mar 25, 2024

Improve MockLogger - level/limited missing method

Rails commit bd19d1baf1 [1] added a check of logger.level which was not
supported by the MockLogger.

This commit adds a mock level method. And limits the missing_method to
respond only to logging calls, so any other calls will raise a
NoMethodError to make future debugging easier.

[1]
rails/rails@bd19d1b

Stacked on #2368

Introduce the _connection method which returns whichever is defined
between @unconfigured_connection or @raw_connection.
verify! ensures that @raw_connection is defined.
Rails commit bd19d1baf1 [1] added a check of logger.level which was not
supported by the MockLogger.

This commit adds a mock level method. And limits the missing_method to
respond only to logging calls, so any other calls will raise a
NoMethodError to make future debugging easier.

[1]
rails/rails@bd19d1b
@andynu andynu changed the title Improve MockLogger - level/limited missing method Improve MockLogger - level/limited missing method (3/10) Mar 25, 2024
@andynu andynu changed the title Improve MockLogger - level/limited missing method (3/10) Improve MockLogger - level/limited missing method (3) Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant