cosmo0920
null+****@clear*****
Wed Oct 8 20:12:11 JST 2014
cosmo0920 2014-10-08 20:12:11 +0900 (Wed, 08 Oct 2014) New Revision: 9de4454769493d258da1fc28f601b58262640e3a https://github.com/logaling/logaling-command/commit/9de4454769493d258da1fc28f601b58262640e3a Merged 656b96a: Merge pull request #97 from cosmo0920/migrate-rspec-2-to-3 Message: spec repository: use allow(obj).to syntax Modified files: spec/logaling/repository_spec.rb Modified: spec/logaling/repository_spec.rb (+3 -3) =================================================================== --- spec/logaling/repository_spec.rb 2014-10-08 19:49:04 +0900 (aeb0382) +++ spec/logaling/repository_spec.rb 2014-10-08 20:12:11 +0900 (c7e8317) @@ -38,7 +38,7 @@ module Logaling before do glossary.add("user-logaling", "ユーザ", "ユーザーではない") glossary.add("user-logaling", "ユーザー", "") - File.stub(:mtime).and_return(Time.now - 1) + allow(File).to receive_message_chain(:mtime).and_return(Time.now - 1) repository.index @terms = repository.lookup("user-logaling", glossary) end @@ -54,7 +54,7 @@ module Logaling glossary.add("user-logaling", "ユーザ", "ユーザーではない") glossary.add("user-logaling test", "ユーザーてすと", "") glossary.add("ゆーざ", "test user-logaling test text", "") - File.stub(:mtime).and_return(Time.now - 1) + allow(File).to receive_message_chain(:mtime).and_return(Time.now - 1) repository.index options = {"dictionary"=>true} @terms = repository.lookup("user-logaling", glossary, options) @@ -97,7 +97,7 @@ module Logaling before do glossary.add("user", "ユーザ", "ユーザーではない") glossary.add("user-logaling", "ユーザ", "ユーザーと迷い中 #{annotation_word}") - File.stub(:mtime).and_return(Time.now - 1) + allow(File).to receive_message_chain(:mtime).and_return(Time.now - 1) repository.index options = {"fixed" => true} @terms = repository.lookup("user", glossary, options) -------------- next part -------------- An HTML attachment was scrubbed... Download