SecureRandom を stub すると、なぜ Rails の CSRF が壊れるのか
https://qiita.com/okarina-chaan/items/747be079183dd0d6cc83?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
SecureRandom を stub すると、なぜ Rails の CSRF が壊れるのか
https://qiita.com/okarina-chaan/items/747be079183dd0d6cc83?utm_campaign=popular_items&utm_medium=feed&utm_source=popular_items
도쿄 가스의 재난 방지 최전선을 지키는 Ruby: 지진 대응 시스템 SUPREME 사례
도쿄 가스는 Ruby 기반의 SUPREME 시스템을 통해 지진 발생 시 가스 공급을 자동 제어하며 대규모 화재와 폭발로부터 시민들을 보호하고 있습니다.
#rspec
https://ruby-news.kr/articles/ruby-at-the-front-line-of-disaster-prevention
This. I've seen a lot of garbage tests this year. I like #RSpec's `xit` shorthand for walking more slowly and deliberately through test scenarios, regardless of whether an agent is involved or not.
https://www.andy-gallagher.com/blog/stop-vibe-coding-your-unit-tests/
@postmodern and also, why doesn't #Ruby itself have an opposite direction of .include? method?
[1, 2, 3].include? 1
Like #Rails’ .in?
1.in? [1, 2, 3]
Then the #RSpec would be:
expect(1).to be_in [1, 2, 3]
continuing about collection-based #rspec matchers...
When using `match` and `include` you can let the `it` spec to speak for itself:
```ruby
context 'when one of the values is off' do
it do
expect(subject).to match(
error: 'P',
context: be_a(String).and( eq('S'))
)
end
end
```
I tend to not declare what the `it` is, because it's gratifying see its errors :), usually that's the context blocks are for.
* puns intended
# ruby