Skip to content
  • Yves Senn's avatar
    a80fb6f9
    tests, define `Rails.root` before loading Action Mailer. · a80fb6f9
    Yves Senn authored
    Since `bin/test` would define `Rails.root` before loading AM but `bundle
    exec rake` would define it after loading AM, this lead to the following
    test failure when using `bin/test`:
    
    ```
    --- expected
    +++ actual
    @@ -1 +1 @@
    -{:location=>"/var/folders/_r/9kh50y4j0vn7zgg2p65z1lcm0000gn/T/mails"}
    +{:location=>"/Users/senny/Projects/rails/actionmailer/tmp/mails"}
    ```
    
    This patch ensures that `Rails.root` is defined when loading AM to
    achieve consistent test results.
    a80fb6f9
    tests, define `Rails.root` before loading Action Mailer.
    Yves Senn authored
    Since `bin/test` would define `Rails.root` before loading AM but `bundle
    exec rake` would define it after loading AM, this lead to the following
    test failure when using `bin/test`:
    
    ```
    --- expected
    +++ actual
    @@ -1 +1 @@
    -{:location=>"/var/folders/_r/9kh50y4j0vn7zgg2p65z1lcm0000gn/T/mails"}
    +{:location=>"/Users/senny/Projects/rails/actionmailer/tmp/mails"}
    ```
    
    This patch ensures that `Rails.root` is defined when loading AM to
    achieve consistent test results.
Loading