Converted to factory_girl use, a little refactored

This commit is contained in:
Joe Sak 2010-08-09 14:05:16 -05:00
parent 4a25cde49f
commit be4c8c3836
6 changed files with 59 additions and 10 deletions

View file

@ -1,8 +1,15 @@
require 'spec_helper'
describe BlogPost do
it "initializes" do
blog = BlogPost.new
blog.should_not be_nil
end
context "wiring up" do
before(:each) do
@post = Factory(:post)
end
it "saves to the database" do
@post.should_not be_nil
end
end
end