From e8cd69574c68ed612b99d6dd9ea2d1d640887a0e Mon Sep 17 00:00:00 2001 From: 29037-yoshimura Date: Sat, 20 May 2017 14:01:45 +0900 Subject: [PATCH 1/3] Add Comment --- webapi/config-webapi.ru | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webapi/config-webapi.ru b/webapi/config-webapi.ru index 43e3689..e933776 100644 --- a/webapi/config-webapi.ru +++ b/webapi/config-webapi.ru @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +#HELLO!! $LOAD_PATH.unshift File.expand_path('../lib', __FILE__) @@ -32,4 +33,4 @@ map '/api' do map '/0.0.1' do run Webapi::Endpoints::V001::Webapi.new end -end \ No newline at end of file +end From f605786c307aa9b4a96975df997511bbdb9465d0 Mon Sep 17 00:00:00 2001 From: 29037-yoshimura Date: Sat, 20 May 2017 17:12:10 +0900 Subject: [PATCH 2/3] test error --- webapi/spec/comment_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapi/spec/comment_spec.rb b/webapi/spec/comment_spec.rb index 98107c9..c3bd249 100644 --- a/webapi/spec/comment_spec.rb +++ b/webapi/spec/comment_spec.rb @@ -9,8 +9,8 @@ expect(comment).to eq(Webapi::Models::Comment[comment.id]) end - # it "validation display_name size must be 10 or less." do - # expect { Webapi::Models::Comment.create(:display_name => "spec test 2", - # :comment => "test comment.") }.to raise_error(Sequel::ValidationFailed) - # end + it "validation display_name size must be 10 or less." do + expect { Webapi::Models::Comment.create(:display_name => "spec test 2", + :comment => "test comment.") }.to raise_error(Sequel::ValidationFailed) + end end From 6f4fa96108724d3778fa48d2a40ce41bb3701f12 Mon Sep 17 00:00:00 2001 From: 29037-yoshimura Date: Sat, 20 May 2017 17:37:35 +0900 Subject: [PATCH 3/3] back --- webapi/spec/comment_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapi/spec/comment_spec.rb b/webapi/spec/comment_spec.rb index c3bd249..277538c 100644 --- a/webapi/spec/comment_spec.rb +++ b/webapi/spec/comment_spec.rb @@ -9,8 +9,8 @@ expect(comment).to eq(Webapi::Models::Comment[comment.id]) end - it "validation display_name size must be 10 or less." do - expect { Webapi::Models::Comment.create(:display_name => "spec test 2", - :comment => "test comment.") }.to raise_error(Sequel::ValidationFailed) - end + #it "validation display_name size must be 10 or less." do + # expect { Webapi::Models::Comment.create(:display_name => "spec test 2", + # :comment => "test comment.") }.to raise_error(Sequel::ValidationFailed) + #end end