Code Archive Skip to content Google About Google Privacy Terms
追è¨2ï¼2015/09/08ï¼ããããããã¨ã«ãæªã ã«ãã®è¨äºãããã¯ãã¼ã¯ãã¦ãã ããæ¹ãããã£ãããã¾ããã2008å¹´ã«æ¸ããè¨äºãªã®ã§ã注æä¸ãããå 容ã¯ã¢ãããã¼ããã¦ãã¾ãããç§èªèº«ã¯ãã§ã«Rubyã使ã£ã¦ãã¾ããã 追è¨ï¼å¤ãæ å ±ã§ãã®ã§ãè¨äºã®æ¥ä»ã¨ã使ãã®RSpecã®ãã¼ã¸ã§ã³ãè¦æ¯ã¹ã¦ãåèç¨åº¦ã«ã覧ãã ããã大é¨åã¯éç¨ããã¯ãã§ããã Matcherããã¡ãã¡èª¿ã¹ãã®ãé¢åã«ãªã£ã¦ãå ¬å¼ã®ãªãã¡ã¬ã³ã¹ããã¥ã¢ã«ã¯ä¸è¦§æ§ãä½ããããèªåã§ä¸è¦§è¡¨ãä½ã£ãã RSpecãã®ãã®ã«ã¤ãã¦ã¯ãã¹ã¯ã¹ããã¯ã®ã¹ ã第 1 åã RSpec ã®æ¦è¦ã¨ãRSpec on Rails (ã¢ãã«ç·¨)ãªã©ãã©ããããã®ãã¡RSpec on Railsçãä½ãäºå®ã åå not((should_notã§ä½¿ãããã©ããã¨ããæå³ã)) æå³ã»æ©è½ == â ==æ¼ç®åãå©ç¨ãã¦æ¯è¼ãããex
The RSpec Development Team is pleased as glug (thatâs kind of like punch, but more festive) to announce RSpec-1.1.0. Thanks to all who have contributed patches over the last few months. Big thanks to Dan North and Brian Takita for their important work on this release. Dan contributed his rbehave framework which is now the Story Runner. Brian patiently did a TON of refactoring around interoperabili
Spring Bootã«ããAPIããã¯ã¨ã³ãæ§ç¯å®è·µã¬ã¤ã 第2ç ä½å人ãã®éçºè ããInfoQã®ããããã¯ãPractical Guide to Building an API Back End with Spring BootããããSpring Bootã使ã£ãREST APIæ§ç¯ã®åºç¤ãå¦ãã ããã®æ¬ã§ã¯ãåºçæã«æ°ãããªãªã¼ã¹ããããã¼ã¸ã§ã³ã§ãã Spring Boot 2 ã使ç¨ãã¦ãããããããSpring Boot3ãæè¿ãªãªã¼ã¹ãããéè¦ãªå¤...
ããã³ã¾ãã¯ãRuby ã«é¢ããæè¡è¨äºã¯ãã¡ããã®ãã¨ãRubyist ã¸ã®ã¤ã³ã¿ãã¥ã¼ãã¨ãã»ã¤ããã®ä»ããå±ãããã¦ã§ãéèªã§ãã Rubyist Magazine ã«ã¤ã㦠ãRubyist Magazineããç¥ãã¦ããã³ã¾ãã¯ãæ¥æ¬ Ruby ã®ä¼ã®æå¿ã«ãã Rubyist ã® Rubyist ã«ãããRubyist ã¨ããã§ãªã人ã®ããã®ã¦ã§ãéèªã§ãã ææ°å· Rubyist Magazine 0058 å· ããã¯ãã³ãã¼ Rubyist Magazine 0058 å· RubyKaigi 2018 ç´åç¹éå· Rubyist Magazine 0057 å· RubyKaigi 2017 ç´åç¹éå· Rubyist Magazine 0056 å· Rubyist Magazine 0055 å· Rubyist Magazine 0054 å· æ±äº¬ Ruby ä¼è° 11 ç´
â [javascript] JSSpec RSpecã®Javascriptçä½ã£ããé¢ç½ãããããï¼ã¨æã£ããã ããæ¢ã«ãã£ãã JSSpec - AlansWiki ããã¥ã¢ã«ã¯ãã¡ãã JSSpec/Manual - AlansWiki expect("Hello World").should_match(/ello/); expect([1,2,3]).should_have_at_most(4, "items"); RSpecã¨éã£ã¦ãexpectãããå§ã¾ããã ãªããArrayãStringãæ¡å¼µããã°expectãç¡ãããã¨ãã§ããã¨æããã ãã©ã ã©ããªãã ãã ãã¢ããã£ãããã JSSpec results RSpecã«ã¤ãã¦ã¯å æ¥åºãã°ããã®ä¼èª¬ã®è¨äº(ç¬)ãåç §ãã¦ãã ããã Rubyist Magazine - ã¹ã¯ã¹ããã¯ã®ã¹ ã第 1 åã RSpec ã®æ¦è¦
â 1 Re:ãautotestãæ¢ã¾ããªããã ãã¹ãã±ã¼ã¹ãå¢ããã¦ããã¤ã®é ãããCtrl+C*2ã§ã¯autotestãæ¢ã¾ã£ã¦ãããªããªã£ãã ã«ãã¨ãªã£ã¦é£æãã¦ãå ¨ç¶ãã¡ã ç§ãæ°ãã¤ãã¨Autotest::Screenã§Ctrl+C 2åã§ã¯æ¢ã¾ããªããªãã¾ãã(ããããããªã½ã¼ã¹ã³ã¼ãã«ãªã£ã¦ããããªãã¼ãããããããªãã£ãããªæ¨¡é è¨æ¶ã:interruptã®ããã¯ã§ã¹ãã¼ã¿ã¹ã¡ãã»ã¼ã¸ãæ¸ãæãã¦ããããã§ããããããæãã¦ã¿ãã¹ã?)ã $HOME/.autotest require 'autotest/screen' Autotest::HOOKS.delete(:interrupt) ããã§æ¢ã¾ãããã«ãªãã¾ãããæ£ãã対å¦ãã©ããã¯ãããã¾ãããã â 2 RSpec + AutoTest::Screen Autotest::Screenã便å©ãªä»¶ã«ã¤ãã¦ã (Sai
RSpecã¯é·ãã0.Xãªãªã¼ã¹ãç¶ãã¦ãããAPIã®å¤æ´ããªããã¦ãã¾ããã ãããã2007/5/19ã«æ£å¼ããªã¼ã¹ã§ãã1.0.0ãå ¬éãããç¾å¨ã§ã¯ãã®ãã¼ã¸ã§ã³ãæ´»çºã«ã¡ã³ããã³ã¹ããã¦ãã¾ãã æ©è½ã®è¿½å ã¯ãã¡ããããã°ä¿®æ£ãå¤ãè¡ããã¦ãããã¾ãRSpecã®éçºé£ãããã®ãã¼ã¸ã§ã³ã®APIã¯å¾æ¹äºææ§ãä¿ã£ã¦ãããã¨ã表æãã¦ãã¾ãããããã使ãã¯ãããåã«ã¯ããã¹ãåºç¤ãããããå¤ãããåé¡ã¯å¤å°ã¯åã¾ããã¨ã¨æãã¾ãããã®ã¸ããæ¸å¿µãã¦RSpecãå°å ¥ãã¦ããªãæ¹ããããããããã®ãã¼ã¸ã§ã³ã¯æ¯éããã£ã¦ã¿ã¦ãã ããã ã¨ãããã¨ã§ãå®éã«0.8.xã§æ¸ãã¦ããspecã1.0.0äºæã«ãã¦ã¿ã¾ãããå®å ¨ã«1.0.xã¹ã¿ã¤ã«ã®æ¸ãæ¹ã¨ããããã§ã¯é³´ããããã¾ã§æ¢åè³ç£åãåä½ãããããã®æå°éã®å¤æ´ãã¨ãããã¨ã«å¾¡æ³¨æãã ããã 注æç¹ contextã¨specify å¼
Since before January (I donât know how far before), Iâve been writing all my tests using the Cool New Way. Not because itâs cool, or new, but because it really helps me write better code. Let me tell you about it. A Brief and Subtle Introduction Be dee dee. Behavior driven development. BDD is a way of writing code by testing what the code should do rather than testing the code itself. Does that ma
å æ¥æ¸ãã SeleniumRC spec ã®ä¸ã§ä½¿ã£ã¦ããã¯ããã¯ãæè¿ãä¼ç¤¾ã§æµè¡ã£ã¦ãã 2007-12-04追è¨: ãã®ãã¯ããã¯ã¯RSpec 0.8以åã®ããã«éçºãã¾ãããRSpec 1.0以éã§ã¯shared behaviourã使ãã¾ãããããã ãRSpecãããããææ³ã®åºç¤ã¨ãã¦åèã«ã¯ãªãããããã¾ããã ã³ã³ããã¹ãã«ãããå ±éã®åæåå¦çã¯å¿è«ãsetupãcontext_setupã«æ¸ãã°ãããã ãã©ãåé¡ã¯è¤æ°ã®ã³ã³ããã¹ãã«ã¾ãããå ±éã®åæåå¦çããããã¯ãmodelã®specã§fixtureãè¨å®ããããcontrollerã®specã«ããã¦ã³ã³ããã¼ã©ã¼åãæå®ãããã ãããã£ã¦ããã¡ãã¡æ¸ãã®ããªããDRYãããªãæ°ããããç¹ã«ã1ã¤ã®modelã«å¯¾ããspecãcontextããæ§æãããã¨ã(諸æ©ããæ¹å¼ãcontextã¨ããè¨èã®æå³åããã
å æ¥RSpec on Rails0.7(0.7.1ã)ãåºã¾ããã ã¾ã ã¾ã æ¯ãã¦ããªãã®ã§å®éã®ããã¸ã§ã¯ãã§æ¡ç¨ããã®ã¯é£ããé¢ãããã¾ãããisoration from Databaseãæ¯ããmock/stub frameworkããisoration from viewsã¯å¼·åãªã®ã§ãããã»ã©å½±é¿ã®ç¡ãä½ææ¸ã¿ã®ç¤¾å ã¢ããªã«RSpec on Railsãé©ç¨ãã¦ã¿ã¾ããã maihaããããã£ã¦ããããããã«ãèªä½ã§ä½ãã®ãããã楽ããããªã®ã§ããã¨ããããã¯ä½¿ã£ã¦ã¿ã¾ããmock/stub frameworkã®å®è£ ã®è©³ç´°ããã¨ã§ã¿ãã BBDã§ã¯ãBehaviourãæ¸ãã¦ããã³ã¼ãã®å®è£ ãè¡ãã®ã§ãããä»åã¯ä»¥åã«ãã¿ããã§ä½ã£ã社å ç¨æ å ±å ±æãã¼ã«Basecamp(æsignalsã®ãã¯ãª)ã«Behaviourãæ¸ãã¦ãããã¨ã«ãªãã¾ãã Basecampã®Spec 社å ã§
ã©ã¡ãã Dave Astel ã«ãããè±èªã§ããããããããè¦ãã§ãã RSpec ã®cheat sheet http://blog.daveastels.com/articles/2006/09/09/rspec-cheat-sheet ä»æ¥è¦ä»ãããã§ãããåºæ¬çãªä½¿ããããä¹ã£ã¦ãã®ã§ããæãã§ããå æ¥ã®ç§ã®ã¨ã³ããªããããã¦ã©ããããã®ã¸ãç¥ã£ã¦ããååæ¸ããããªæãã§ãã RSpec http://rubyforge.org/pipermail/rspec-devel/2006-August/000477.html ãã¡ãã¯ãã¥ã¼ããªã¢ã«ãRSpec ã®ãã¼ã¸ã§ã³ãã¡ãã£ã¨å¤ãã§ããã®ã¾ã¾ããåããªãã®ãé£ç¹ã§ãããããããããã§è¯ããã¨ãMastermind ã¨ããã²ã¼ã (女ç¥è»¢çãã£ããã¨ã®ããã²ã¨ã¯ãã³ã¼ããã¬ã¤ã«ã¼ãã¨ããã¨åããæããã)ãå®è£ ãã¾ãã ã§ãç§ã®å ´åã
å¹´æ«å¹´å§ã«ã¹ã©ã¤ããä½ããã¨æã£ã¦æ«æãã¾ããã RSpec ã®ãã¹ãã³ã¼ãã¯è¦æ £ããªã "should" ãªãããåºã¦ãã¦é£ãããã«è¦ãã¾ãããå®ã¯è¦ããªãããããªãã®ã¯ 4ã¤ç¨ã®èªå½ã ãã§ãã*1 Object#should_xxx [args] Object#should_have(n).items Object#should_not_xxx Proc#should_raise() Object#should_xxx [args] è¶ åºæ¬ã®æ¸ãæ¹ã§ããshould_ ã®å¾ã«ç¶ããã¡ã½ãããå¼ã³åºãããã®çµæãçãªããã¹ãã¾ããargs ã§ããã®ã¡ã½ãããã®å¼æ°ãä¸ãããã¾ããããã ãã ã¨ã¤ã¡ã¼ã¸ãè¾ãã¨æãã¾ãã®ã§ããã¤ãä¾ãã "?"ã¯ä»ãã¦ãä»ããªãã¦ã OK ã ã£ãã¨æãã¾ãã 1.should_equal 1 Fixnum#equal ãå¼ã³åºãã¦ã¾ããä¸è¨ã®ä¾ã§ã¯ä¸è¨ã®å¤å®
RSpec on Railsã®ãããã ãã ããã°ããªããä»é ãBDD(Behaviour Driven Development)ãç¥ãã¾ããããã ããããã¯ãã¡ãã¨BDD or TDDã§éçºãé²ãã¾ãã BDDã¯ãã¹ãé§åéçºã¨è¨èã®è¨ãåãã大ããç°ãªã£ã¦ããã ãããã¤ãã¢ãæ¸ãã¦ä»æ§ãè¨è¨ããããããã大ããªããªã·ã¼ã BDDã§ã¯å¿ ãä»æ§ã³ã¼ã(spec)ãæ¸ãã¦ããå®éã®ã³ã¼ãã£ã³ã°ãè¡ãã Rubyã«ã¯ãRSpecã¨ãããã¼ã«ããããããå©ç¨ããã gemããã±ã¼ã¸ãç¨æããã¦ããã®ã§ç°¡åã $ gem install rspec 次ã«RSpec on Railsãã©ã°ã¤ã³ãã¤ã³ã¹ãã¼ã«ã REL_X_Y_Zã®é¨åãrspecã®ãã¼ã¸ã§ã³ã¨ããããå¿ è¦ãããã $ cd RAILS_ROOT $ ruby script/plugin install svn://rubyfor
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}