I have a model with a relationship like this: 

```
class Category < ActiveRecord::Base
 has_many :items
end

class Item < ActiveRecord::Base
  belongs_to :category
  before_save :default_values
  validates_presence_of :header

  def default_values
    if self.category.cat_is_enabled==true
      self.is_enabled=true
    end
  end
end

```

I'd like to just check the validates\_presence\_of with: 

require 'spec\_helper'

```
describe Item do
  pending "add some examples to (or delete) #{__FILE__}"
  it "should have a header value" do
    mi=Item.create(:header => "").should_not be_valid
  end
end

```

but I get an error on this for "undefined method `cat\_is\_enabled' for nil:NilClass". How would I turn off default values? Is there a better way to test validations?

thx