title: SimpleCov calculate 0% coverage for user model
body: <p>I decided to try using <a href="https://github.com/colszowka/simplecov" rel="nofollow noreferrer">simplecov</a> gem, and I think it's a cool tool, but I have one problem:</p>
  <p>I have a model <code>User</code>, and I have <code>user_spec.rb</code> which contains test cases, but simplecov shows 0% coverage of this model. And it shows 100% coverage for other models, which is true. I don't understand what's the issue with the <code>User</code> model.</p>
  <pre><code>class User &lt; ActiveRecord::Base
  
    extend Enumerize
  
    # Include default devise modules. Others available are:
    # :confirmable, :lockable, :timeoutable and :omniauthable
    devise :database_authenticatable, :registerable,
           :recoverable, :rememberable, :trackable, :validatable
  
    STATUS_ACTIVE = :active
    STATUS_BANNED = :banned
  
    enumerize :status, in: [STATUS_ACTIVE, STATUS_BANNED], default: STATUS_ACTIVE
  
    with_options inverse_of: :user, dependent: :destroy do
      has_one :profile
      has_many :articles
    end
  
    before_create :build_default_profile
  
    private
  
    def build_default_profile
      build_profile
    end
  
  end
  </code></pre>
  <p>user_spec.rb</p>
  <pre><code> require 'rails_helper'
      
      RSpec.describe User, type: :model do
      
        describe '#validations' do
          it { should have_one(:profile).dependent(:destroy) }
      
          it { should validate_presence_of(:email) }
          it { should validate_presence_of(:password) }
          it { should validate_confirmation_of(:password) }
      
          it { should enumerize(:status).in(User::STATUS_ACTIVE, User::STATUS_BANNED).with_default(User::STATUS_ACTIVE) }
      
          #TODO other devise validations
        end
      
        describe '#callbacks' do
          it 'creates profile after_create' do
            user = build(:user)
            expect(user.profile).to be_nil
            user.save
            expect(user.profile).to be_a(Profile)
          end
      
          it 'must not create profile after update' do
            user = create(:user)
            profile = user.profile
            user.email = Faker::Internet.email
            user.save
            expect(profile.id).to eq(Profile.find_by(user_id: user.id).id)
          end
        end
      
      end
  </code></pre>
  <p>coverage</p>
  <pre><code>File                 % covered Lines Relevant Lines Lines covered   Lines missed    Avg. Hits / Line
  app/models/user.rb      0.0 %   28  28  0   28  0.0
  app/models/admin.rb     100.0 % 3   1   1   0   1.0
  app/models/article.rb   100.0 % 32  19  19  0   5.8
  app/models/profile.rb   100.0 % 13  6   6   0   1.0
  </code></pre>