end
end
+ describe '文字コード検証に於いて' do
+ before do
+ end
+
+ context 'nameを検証するとき' do
+ it 'Shift JISなら失敗する' do
+ @author.name = "\x83G\x83r\x83]\x83D"
+ lambda{
+ @author.valid_encode
+ }.should raise_error(Pettanr::BadRequest)
+ end
+ end
+
+ end
+
describe 'デフォルト値補充に於いて' do
it '名前がno nameになっている' do
@author = FactoryGirl.build :author, :name => nil