@tgxworld technically, you're right. `min_cost` does not change in this test, as you pointed out. However, the purpose of this particular test is to ensure "Password digest cost can be set to bcrypt min cost". Therefore, although `min_cost` is already set to `true` in setup, it is good to explicitly set it here so that this test is __clear__. Otherwise, you'll have to refer to `setup` first, before you can be certain what this is trying to test. That's why I don't recommend removing `ActiveModel::SecurePassword.min_cost = true` despite it being "redundant".

As for the `teardown` block, if you take a look at https://github.com/rails/rails/blob/master/activemodel/lib/active_model/secure_password.rb#L8, you'll see that by default `min_cost` is set to `false`. We set it to `true` in setup, and therefore have to restore it back to false to prevent leaks of global state.