Rspec testing of counter_cache column's returning 0

The counter_cache is getting updated in the database directly. This will not affect the copy of the model you have loaded into memory so you need to reload it:

it "media_count should == 1 " do 
  user.reload
  user.media_count.should == 1
end

But, I don't think that is how I would test this. As you have it, your test is very tightly coupled to setup code that seem like it doesn't need to be there at all. How about something like this for a stand alone spec:

it "has a counter cache" do
    user = FactoryGirl.create(:user)
    expect { 
      user.media.create(caption: "Test media") 
    }.to change { User.last.media_count }.by(1)
end