test controller wich depends on model rails code example
Example: rails don't render if in test environment
Rails.env.production?
#or
Rails.env.development?
#or
Rails.env.test?
Rails.env.production?
#or
Rails.env.development?
#or
Rails.env.test?