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