title: Rspec after_save
body: <p>I have a function that checks whether a string variable is empty and fills it with a value if so. This method runs prefixed with <code>before_save</code>.</p>
  
  <p>I want to write an rspec test for this. I have a model factory with the variable in concern blank. How do I test if the variable changed after save?</p>
  
  <p>So far I have,</p>
  
  <pre><code>it 'should autofill country code' do
    empty_country_code = ''
    @store = Factory.build(:store, :country_code =&gt; empty_country_code)
    @store.save
    @store.country_code.should eql '1'
  end
  </code></pre>