SecureRandom を stub すると、なぜ Rails の CSRF が壊れるのか - Qiita

はじめまして! プログラミング初学者のおかりなです。 RUNTEQにて学習しています。 入学して7ヶ月が経ちました。 今は卒業制作の本リリースに向けて実装頑張っています。 なにかあればぜひコメントください! こんな方へ読んでほしい 外部APIを用いた認証のテストを書きた...

Qiita

도쿄 가스의 재난 방지 최전선을 지키는 Ruby: 지진 대응 시스템 SUPREME 사례

도쿄 가스는 Ruby 기반의 SUPREME 시스템을 통해 지진 발생 시 가스 공급을 자동 제어하며 대규모 화재와 폭발로부터 시민들을 보호하고 있습니다.

#rspec
https://ruby-news.kr/articles/ruby-at-the-front-line-of-disaster-prevention

도쿄 가스의 재난 방지 최전선을 지키는 Ruby: 지진 대응 시스템 SUPREME 사례

최신 Ruby, Rails, AI 관련 뉴스와 트렌드를 한곳에서 만나보세요

Ruby-News || 루비 AI 뉴스

hspec uses the same syntax Rspec used many years ago.

Makes me feel nostalgic.

Had to write a spec for some Ruby code recently, turns out instead of function(args).should_equal result one now has to write expect(function(args).to == result.

Oh why?

#haskell #ruby #hspec #rspec

The Arrange/Act/Assert pattern

Organizing tests for readability.

thoughtbot

🥳 Happy 30th birthday to #RubyLang, still my favorite programming language! Here's a coupon for my #RSpec book for just $9, with practice #TDD advice. Free updates for Rails 8.1 and Ruby 4 coming early next year! Boosts appreciated! 🥳

https://leanpub.com/everydayrailsrspec/c/ruby30

Everyday Rails Testing with RSpec

Real-world advice for adding reliable tests to your Rails apps with RSpec. Learn to test with confidence!

#mildlysatisfying #rspec4Life #rspec
10591 is the zip code for Tarrytown, NY, the real world setting of Washington Irving's "The Legend of Sleepy Hollow".

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/

Stop vibe coding your unit tests — Andy Gallagher

Don't write noisy, unconstructive unit tests with LLMs

TIL in #Ruby #RSpec,

this:

expect(File.exist?(old_file)).to be true

can be shortened to this:

expect(File).to exist(old_file)

expect(File).to exist old_file

Neat!

@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