Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 0afb912ece
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (18 sloc) 0.524 kb
require 'spec_helper'
describe Diary do
describe "#get_diary" do
context "diary exist" do
it "return today's diary" do
diary = FactoryGirl.create(:diary)
result = Diary.get_diary
expect(result.content).to eq(diary.content)
end
end
context "diary not exist" do
it "create a new diary" do
diary = Diary.get_diary
diary.should be_new_record
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.