こんな感じに、
trivial warningが出力されない- 全部 ok
になればOKです。
| "月火水木金".split('').each do |w| | |
| [1, 2, 3, 4, 5, '放'].each do |t| | |
| puts w + t.to_s | |
| end | |
| end |
| describe "Rspec include test" do | |
| it "include" do | |
| hash = {:a => 'A', :b => 'B', :c => { :ca => 'CA' }} | |
| expect(hash).to include(:c => {:ca => 'CA'}); # | |
| expect(hash).to include(:a => 'A', :c => {:ca => 'CA'}); # ならべてもいいっぽい | |
| expect(hash).to_not include(:ca => 'CA'); # ちゃんと構造みてくれる | |
| expect(hash).to include(:a); # キーだけでもOK | |
| expect(hash).to_not include(:d); # キーだけでもOK | |
| end | |
| end |
| #/bin/bash | |
| avg=0 | |
| host="yahoo.co.jp" | |
| while(true) | |
| do | |
| # ping から レスポンスタイム を取得 | |
| rtt=$(ping -c 1 $host | head -2 | tail -1 | sed 's/.*time=\(.*\) ms$/\1/g' | sed 's/\..*$//') | |
| echo $rtt |