SUZUKI Miho
null+****@clear*****
Thu Sep 20 17:07:59 JST 2012
SUZUKI Miho 2012-09-20 17:07:59 +0900 (Thu, 20 Sep 2012) New Revision: ec178e6987303f88423704e034db8c40a778daa0 https://github.com/logaling/logaling-command/commit/ec178e6987303f88423704e034db8c40a778daa0 Log: Check yaml data instead of alert message Modified files: spec/logaling/command_spec.rb Modified: spec/logaling/command_spec.rb (+4 -3) =================================================================== --- spec/logaling/command_spec.rb 2012-09-20 16:32:37 +0900 (5366c6f) +++ spec/logaling/command_spec.rb 2012-09-20 17:07:59 +0900 (75ece9b) @@ -341,11 +341,12 @@ describe Logaling::Command::Application do context 'with exisiting bilingual pair and note' do before do - @stdout = capture(:stdout) { command.update("spec", "テスト", "テスト", "備考") } + command.update("spec", "テスト", "テスト", "備考") + @yaml = YAML::load_file(glossary_source_path).find{|h| h["source_term"] == "spec" } end - it 'should show error message' do - @stdout.should include "already exists" + it "term's target_term should not be updated" do + @yaml.should == {"source_term"=>"spec", "target_term"=>"テスト", "note"=>"備考"} end end -------------- next part -------------- An HTML attachment was scrubbed... 다운로드