railsの環境変数を変えたい
Rails.env.define_singleton_method(:trial?, -> { true }) rspecを使用の際は、Rails.env.stub(:development? => true) で良い rspec2 - mock Rails.env.development? using rspec - Stack Overflow
This post is licensed under CC BY 4.0 by the author.