}.should change(Panel, :count)\r
end\r
end\r
+ context '不正なjsonデータのとき' do\r
+ before do\r
+ end\r
+ it 'エラーメッセージがセットされている' do\r
+ r = @panel.store false, @author\r
+ @panel.errors[:base].should_not be_blank\r
+ end\r
+ end\r
context '従属データの検証に失敗したとき' do\r
before do\r
Panel.any_instance.stub(:validate_child).with(any_args).and_return(false)\r
end\r
it 'エラーメッセージがセットされている' do\r
r = @panel.store @attr, @author\r
- @panel.errors.should_not be_empty\r
+ @panel.errors[:base].should_not be_blank\r
end\r
end\r
context 'カラム値がFalseしたとき' do\r