Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Transpec is a tool for converting your specs to the latest RSpec syntax with static and dynamic code analysis. With Transpec you can upgrade your RSpec 2 specs to RSpec 3 in no time. It supports conversions for almost all of the RSpec 3 changes â not only the expect syntax. Also, you can use it on your RSpec 2 project even if you're not going to upgrade it to RSpec 3 for now. Check out the followi
Myron Marston » Notable Changes in RSpec 3ã®éãªè¨³ã§ãã 誤訳ã»éããã訳ãããã¾ããããTwitterã§@nilp_ã¾ã§ãé£çµ¡é ããã¨å©ããã¾ãã RSpec 3.0.0 RC1ã2æ¥åã«ãªãªã¼ã¹ããã¾ãããããã¦æçµçãª3.0.0ã®ãªãªã¼ã¹ãç®åã«è¿«ã£ã¦ãã¾ãã æã ã¯Î²çããã6ã¶æã«ããã使ã£ã¦ãã¾ãããæã ã¯ããããçããã¨å ±æã§ãããã¨ã«ãããããã¦ãã¾ãã ãããæ°ããã¨ãã ã: ãã¹ã¦ã®gemãã¡ã«ããã£ã¦ Ruby 1.8.6ã¨1.9.1ã®ãµãã¼ãããªããªãã¾ãã ãããã®ãã¼ã¸ã§ã³ã®Rubyã¯ããªãåã«å¯¿å½ãè¿ãã¾ãããRSpecã¯ãããããµãã¼ããã¾ããã Ruby 2.xã®ãµãã¼ãåä¸ æè¿ã®RSpec 2.xã®ãªãªã¼ã¹(ããªãã¡2.0ããªãªã¼ã¹ããããã¨åºããã¤)ã¯Ruby 2ãå ¬å¼ã«ãµãã¼ããã¦ãã¾ãããããRSpec
Myron Marston » The Plan for RSpec 3ã®å¾®å¦è¨³ã§ãã(翻訳æä¸ãªã)ã ããã翻訳ãã¾ããã訳ãããããªã®ã¯åå¼(ãææããã ããã¨å©ããã¾ã)ã 2013/7/23 21:25 id:kakutani ããã®ããã³ãããã¨ã«ã誤訳çãä¿®æ£ãã¾ããããããã¨ããããã¾ã(ã・ิâ¿ï½¥à¸´)ã RSpec 3ã«åãã¦ã®è¨ç» RSpec 2.0ã¯2010å¹´10æã«ãªãªã¼ã¹ããã¾ããã ãªãªã¼ã¹ããã¦ããä»ã¾ã§ã®3å¹´éãå¾æ¹äºææ§ãä¿ã£ãã¾ã¾RSpecãç¶ç¶çã«æ¹åãã¦ãã¾ããã ããããRSpecã®2.xããå¤ããªãªã¼ã¹ã¨ã®å¾æ¹äºææ§ãä¿ã¤ããã«æ®ãã¦ããã²ã©ãã³ã¼ãã®èç©ã¯éçç¹ã«éãã¦ãã¾ãã RSpec 2.14ã¯RSpec 2ã®æå¾ã®ãªãªã¼ã¹ã«ãªãã§ããã(ä»å¾ãå¤åbugfixã®ãªãªã¼ã¹ãããã¨ã¯ããã§ããã)ã æã ã¯RSpec 3ã«åãæãã£ã¦ãã¾ãã
以åãã試ãã¦ã¿ããã£ãfactory girlã ããªãã 試ãã twitter-auth at master ã®ãã¹ãã§ä½¿ããã¦ããã®ã§ããããæ©ã«installãã¦ã¿ãã ï¼ä»ã«ãfakewebããremarkable_railsãªã©ãããããæ°ã«ãªãã®ã使ããã¦ããï¼ ååããªãããããããgirlã£ã¦ä»ãã¨ã thoughtbot's factory_girl at master - GitHub åè has_many throughã§ã®ä¾ãé常ã«åããããã¦åèã«ãªãã¾ãã has_manyãªãã£ã¯ã¹ãã£ãæ¸ãã®ã«ç²ãããFactory Girlããªã¹ã¹ã¡ï¼ - func09 ãã¼ã¸ã§ã³ readmeããè¦ãããããããã¼ã¸ã§ã³ããããããã ç¾æç¹ã§ã¯ä¸è¨ã®ããã ï¼ãã¨ãããããforkããã¦ã¦factory_boyã£ã¤ã¼ã®ãããããããæ°ã«ãªãï¼ factorygirl
ã¢ãã«ãã¸ã§ãã¬ã¼ã¿ã¼ã§çæããã¨ãã«ãfactory_girlã®ã²ãªå½¢ãçæãã¦ãããã ã¤ã³ã¹ãã¼ã« Gemfile ã«ä»¥ä¸ã®ããã«è¨è¿°ãã group :development, :test do gem 'factory_girl_rails' gem 'rails3-generators' end gem ãã¤ã³ã¹ãã¼ã«ããã $ bundle update å®éã®ãã¹ãã³ã¼ã(RSpec) villageã¢ãã«ãªãã¸ã§ã¯ãã¨userã¢ãã«ãªãã¸ã§ã¯ãã¯ãªã¬ã¼ã·ã§ã³ãã¦ãã¾ãããªã¬ã¼ã·ã§ã³ãæ£å¸¸ã«åä½ãã¦ãããã¨ã確ããããã¹ãããæ¸ãã¦ãã¾ããããé常éãã¢ãã«ãªãã¸ã§ã¯ãã«å¯¾ãããã¹ããæ¸ãã¾ãã require 'spec_helper' Factory.define :village do |v| v.name 'ãã¹ãã®æ' v.interval 60 v.start_
水風åã®ããã æ¯æ¥ãã¡ããã¡ãã«æãã ããæ°å¹´ãããã!ãããããããã®ããã«æ¼éã¯å¤ªé½ã¨ãªãã£ã¹ãã«ã¨ã¢ã¹ãã¡ã«ãã®ä¸æ¹åããæ¼ãå¯ãã35âãªã¼ãã¼ã®ç±ã«æã¾ããå¤ã«ãªã£ã¦ãæä½æ°æ¸©ã27âãããã¾ã§ããä¸ãããªãããããªçä¸å°½ãªæ±äº¬éã®ä¸ã®æ®ãããæ¯å¹´ã®ãã¨ã«ãªâ¦
Mock Object Mock Objectã®ä½æ my_mock = mock(<name>) my_mock = mock(<name>, <options>) person = mock('person', :null_object => true) Mockã¯ååãå¼æ°ã«åããä»æ§ã®æ¤è¨¼ãçµãã£ãéã«å ¨ã¦ã®Mockãæ¤è¨¼ãããã optionå¼æ°ãããã·ã¥ã§ä¸ãããã¨ã§Mockã®æ¯ãèãã調æ´ã§ãããç¾å¨ã:null_objectã®ã¿ããµãã¼ãããã¦ããã:null_object => trueãå¼æ°ã«æ¸¡ãã¨Mockã«å¯¾ããå ¨ã¦ã®ã¡ã½ãããMockèªèº«ãè¿ãããã«ãªãã Mockã«å¯¾ãã¦ã¹ã¿ãã¡ã½ãããå®ç¾©ãã person.should_receive(:name) # person.name => nil person.should_not_receive(:name) #
rspec-expectations is used to set expectations in executable examples: describe Account do it "has a balance of zero when first created" do Account.new.balance.should eq(Money.new(0)) end end Issues The documentation for rspec-expectations is a work in progress. We'll be adding Cucumber features over time, and clarifying existing ones. If you have specific features you'd like to see added, find th
ããã³ã¾ãã¯ã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 ç´
Cucumberã使ã£ã¦ãRailsã¢ããªã®ãã¹ããé«ãæ½è±¡åº¦ã§æ¸ãé²ãã¦ããããã«æ¬ ãããªãã®ãWebratã¨ããã©ã¤ãã©ãªã§ããååã®Cucumberå ¨ä½åã®ç´¹ä»ã«å¼ãç¶ãããã¡ãWebratãç´¹ä»ãã¾ããä»åãé·ãã§ãã 2008-01-27ä¿®æ£ id:amacouããããææãåãã¾ãã¦(ã¨ããã¶ãsatokoããã以åãã£ããã£ã¦ã)webrat_steps.rbã®çæå ãã¹ãä¿®æ£ã èª: ${RAILS_ROOT}/step_definitions æ£: ${RAILS_ROOT}/features/step_definitions ãããã¨ããããã¾ãã ä»åã®ã¾ã¨ã Webratããã ç»é¢é·ç§»ãããªã³ã¯ãã¯ãªãã¯ãããããã¿ã³ãã¯ãªãã¯ãããã¨æ¸ãã ãªã³ã¯ã®ã¢ã³ã«ã¼ããã¹ãã§ã¯ã¾ã æ¥æ¬èªã使ãããããã»ã©ãããéã£ãã®ã§æ©æ©æ¸ããããã«ãªãã¯ãã ãã©ã¼ã ã®å ¥åé ç®ãã©
ã¤ã©ã³æçè¨#5ãã«ãããã®ããã¦ãÙÙÛج Ù¾ÙÙ ãã°ãã¡ããã«æãã£ãã«ãããããã¦ãã¨è¨ãã¤ã¤ãã°ãã¡ãããä½ã£ã¦ãããã®ã¯ä¸åº¦ã ãã§ãå ã¯ãã°ãã¡ããã®å§ªã£åããã®å¾ææçã§ããããã°ãã¡ããã¨ãã®å§ã姪ã£åã®ã¨ããã«ããããã¨å¤§å¦ã®åæã3人ã§ãã¼ã ã¹ãã¤ãã¦ãã¦ãããããã®å®¶ã«éã³ã«è¡ããâ¦
ããã³ã¾ãã¯ã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 ç´
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}