Skip to content

Commit

Permalink
Refactor book_spec
Browse files Browse the repository at this point in the history
  • Loading branch information
tatsuosakurai committed May 26, 2012
1 parent cc38c9e commit c394c1f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions spec/models/book_spec.rb
Expand Up @@ -2,8 +2,12 @@
require 'spec_helper'

describe Book do
it 'タイトルが未入力の場合はエラー' do
book = Book.new
book.valid?.should be_false
describe 'validation' do
describe 'title' do
subject { Book.new.valid? }
it '未入力の場合はエラー' do
should be_false
end
end
end
end

0 comments on commit c394c1f

Please sign in to comment.