Files
ubicloud/model.rb
Jeremy Evans 74180ca371 Support log method in specs to allow query logging inside a given block
This makes it significantly easier to debug database behavior
for parts of a spec.  Without this, you need to use the
DATABASE_LOGGER_LEVEL environment variable, which turns on query
logging for everything, making it significantly more difficult
to focus on what you are trying to debug.

To use this, inside the spec, wrap the code you want in the log
method:

```ruby
  it "should do something" do
    setup_code

    log do
      code_you_are_trying_to_debug
    end

    # ...
  end
```
2025-02-05 09:54:46 -08:00

1.8 KiB