rspec
RSpec3ã§å®è£ ãããall Matcherãå°å³ã«ä¾¿å©ã§ãã Ruby - ä»æ¥ãã使ããï¼RSpec 3ã§è¿½å ããã8ã¤ã®æ°æ©è½ - Qiita it 'ãã¹ã¦ã®æ°å¤ãå¥æ°ã§ãããã¨' do # RSpec 3 expect([1, 3, 5]).to all( be_odd ) end all Matcherããããã ããany Matcherï¼ã³ã¬â¦
é åã®åè¦ç´ ã«å¯¾ãã¦Matcherãé©ç¨ããããã®gemãä½ãã¾ããã JUnit ã® everyItem Matcherã«ã¤ã³ã¹ãã¤ã¢ããã¦ãã¾ãã rubygems http://rubygems.org/gems/rspec-every_item github https://github.com/sue445/rspec-every_item ã追è¨ã ã³ã¡ã³ãã§æâ¦
å æ¥ fluent-plugin-out_chatwork ãä½ã£ãã®ã§ãããfluentdã®å ¬å¼ãµã¤ã ã ã¨testunit使ç¨ãåæã«ãã¦ã¦rspecå¨ã«ã¯å³ããä¸ã®ä¸ã ã£ãã®ã§èªåç¨ã«rspecã§fluentdãã©ã°ã¤ã³ãä½ãã¾ã§ã®æé ãã¾ã¨ãã¦ã¾ãã ã³ãã³ããå©ããå¾ã®ãã¡ã¤ã«åºåã¯é©å®ã³â¦
ãã¡ã¤ã«ãä½ãã¡ã½ããã®ãã¹ãããããã¦rspecã§ä¸æãã£ã¬ã¯ããªã使ãããã£ãã®ã§ããããããµã³ãã«ããªãã¦èªåã§ä½ãã¾ãã*1 ï¼JUnitã® TemporaryFolder ã«ç¸å½ãããã®ãã»ããã£ãï¼ around ã¯ãã¹ãã®åå¾ã«å ±éã®å¦çãæã¿ããæã«ä½¿ãhook beâ¦
RubyMineã¯1年以ä¸ä½¿ã£ã¦ãã®ã§ãããIDEä¸ãã rails server ã rspec ãããã¨ãã㨠Gemfileã®gemã§ã¯ãªããpreferences > Ruby SDK and Gems > Ruby SDKãã®gemãåç §ãããããGemfileã¨ã¯å¥ã« gem install rails rspec ã¨ããã£ã¦ãã¦ã¢ãã§ã¼ã³ã¨ãªã£â¦
社å ã§éå¬ãããRSpecåå¼·ä¼ãã¹ãã®ããã©ã¼ãã³ã¹ãã¥ã¼ãã³ã°ã«ã¤ãã¦è©±ããã®ã§è³æãå ¬éãã¦ã¿ã¾ãã RSpecã®åã¯å ãã¦ãããã®ã®ä»ã®è¨èªããã¹ãã£ã³ã°ãã¬ã¼ã ã¯ã¼ã¯ã§ãå¿ç¨ã§ããã¨ãããããããããã¾ããã RSpec Performance Turning from â¦
RSpecã§ã¯ --profile ãªãã·ã§ã³ãã¤ãããã¨ã§ $ rspec --profileTop 10 slowest examples (17.92 seconds, 65.4% of total time): AndroidMarket use stub content behaves like android_market_base_examples #get_overall_top_selling_new_paid_apps 1.9â¦
ä»äºä¸ã«RSpecã§ã¡ãã£ã¨ããçºè¦ããã£ãã®ã§å¿ããªããã¡ã«ããã°ã«æ®ãã¦ããã¾ã spec describe String do it "match with be_include" do "cure peace".should be_include "azatoi" end it "match with include" do "cure peace".should include "azatoâ¦