<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shinkufencer</author_name>
  <author_url>https://blog.hatena.ne.jp/shinkufencer/</author_url>
  <blog_title>コード日進月歩</blog_title>
  <blog_url>https://shinkufencer.hateblo.jp/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>RSpec</anon>
  </categories>
  <description>RAILS_ENVを意図的に設定しているとRSpecが動かない場面に遭遇するので気をつける、というメモ。 環境 rspec-rails (3.8.1) 該当記述 rails g rspec:install で生成されるファイルのテンプレートは以下のような記述になっている ENV['RAILS_ENV'] ||= 'test' rspec-rails/rails_helper.rb at master · rspec/rspec-rails そのため、能動的に環境変数を書いているときに bundle exec rspec をしてもうまく動かないときがあるので注意すること。 RAILS_ENVがあ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshinkufencer.hateblo.jp%2Fentry%2F2019%2F12%2F28%2F000000&quot; title=&quot;RSpec(rspec-rails)のrails_helperの初期設定は「RAILS_ENVがなければtestにする」という設定なので気をつける - コード日進月歩&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2019-12-28 00:00:00</published>
  <title>RSpec(rspec-rails)のrails_helperの初期設定は「RAILS_ENVがなければtestにする」という設定なので気をつける</title>
  <type>rich</type>
  <url>https://shinkufencer.hateblo.jp/entry/2019/12/28/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
