Phil Pirozhkov
Phil Pirozhkov
It feels that it's possible to use one blog instead of two separate ones (the other for Japanese articles) by using https://middlemanapp.com/basics/blogging/#locale-specific-articles-and-localization
### Good intentions I'm [coming](https://github.com/pirj/dotfiles/commit/1c1c08817914a92d5625bdaa2d3ca8a2bdf50456) from [direnv](https://direnv.net/) that I used for double purpose: 1. Set env vars 2. Set $PATH to include `./bin`. The latter is extremely useful to save...
fixes https://github.com/rspec/rspec-expectations/issues/1466 idea https://github.com/rspec/rspec-expectations/issues/805#issuecomment-494380144 ```ruby ary = [1, 2] expect { ary.shift } .to change { ary }.to([2]) .and satisfy { |returned_value| returned_value == 1 } ```
```diff expect { arr
I have a proof of concept of a matcher that works with block expectations, but checks the value returned by the block. Works as a compound matcher, too: ```ruby $bar...
https://gist.github.com/fxn/bf4eed2505c76f4fca03ab48c43adc72
There's no other way certain things can be done. It came handy the other day when I needed to add a spec for something that runs in a loop, to...
## `past?`/`future?` Noteable offenders: ```diff - if reminder_at < Time.zone.now + if reminder_at.past? ``` ```diff - sleep 1 if alarm_at > Time.zone.now + sleep 1 if alarm_at.future? ``` Rails docs:...
There's an ordering difference when using the built-in `` vs the string representation one: ```ruby > Pathname.new(File.expand_path('.')).glob('**/*.rb').sort.first(5) => [#, #, #, #, #] > Pathname.new(File.expand_path('.')).glob('**/*.rb').sort_by(&:to_s).first(5) => [#, #, #, #,...