Sha256: 79634f28b45f30c18127464c395d1edc2eade4326e26960334d92cb6401b51e5
Contents?: true
Size: 585 Bytes
Versions: 3
Compression:
Stored size: 585 Bytes
Contents
require "spec_helper" describe Blogr::Category do it "has a valid factory" do FactoryGirl.create(:blogr_category).should be_valid end it "is invalid without a title" do FactoryGirl.build(:blogr_category, title: nil).should_not be_valid end it "returns the title" do category = FactoryGirl.build(:blogr_category, title: "Hello World") category.title.should == "Hello World" end it "returns the description" do category = FactoryGirl.build(:blogr_category, description: "Some cool stuff") category.description.should == "Some cool stuff" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
blogr-0.0.8 | spec/models/blogr/category_spec.rb |
blogr-0.0.7 | spec/models/blogr/category_spec.rb |
blogr-0.0.6 | spec/models/blogr/category_spec.rb |