ã¯ããã« Web APIã使ã£ã¦æ§ã ãªãµã¼ãã¹ã¨é£æºããã¨ããã¢ã¼ããã¯ãã£ã¯ãã£ããå®çããæãããã¾ããã¿ãªããããWeb APIã使ã£ã¦ãã¼ã¿ãããã¨ãããã¢ããªã±ã¼ã·ã§ã³ãæ¸ãæ©ä¼ãå¢ãã¦ããã®ã§ã¯ãªãã§ããããã Web APIã使ãã¢ããªã±ã¼ã·ã§ã³ã®éçºã§ã¯ããã¹ãããããã°ãããéã®APIã¢ã¯ã»ã¹ãæ©ã¿ã©ããã¨ãªãã¾ããæ¬ç©ã®ãµã¼ãã使ã£ãã®ã§ã¯ãã¹ããã¼ã¿ã®åæåãªã©ã«æéããããã¾ãããéã«HTTPã¢ã¯ã»ã¹èªä½ãã¹ã¿ããã¢ãã¯ã使ã£ã¦éæ¥åãã¦ãã¾ãã¨ãããæ¬å½ã«æå¹ãªãã¹ããªã®ãä¸å®ãæ®ã£ã¦ãã¾ãã¾ãã çè ããä»äºããã©ã¤ãã¼ãã§ã®ã³ã¼ãã£ã³ã°ã§ãã®ãããªæ©ã¿ã«ä½åº¦ãééãã¾ããããããã解決ããããã«éçºããã®ãwwã§ãï¼wwã¨æ¸ãã¦'double-web'ã¨èªã¿ã¾ãâ ï¼â ã ããã¼Webãµã¼ãä½æã©ã¤ãã©ãªww(Double Web) wwã¯ãWebãµã¼ãã¹ã®ç°¡å
gemãä½ã£ã¦rubygems.orgã§å ¬éãã - æ©æ¬è©³è§£ ã®ç¶ããArgsPasrerã®ãã¹ããæ¸ããã ååtestã®ä¸èº«ãæ¸ãã¦ãªãã£ãã®ã§ã newgemã§éå½¢ãä½ãæã«-T rspecãã¦ããã¨ãrspecã®ãã¹ãã³ã¼ãéå½¢ã¨ãããå¼ã³åºãrakeã³ãã³ããèªåé ç½®ãããã åå-T rspecããªãã£ãã®ã§test::unitã®éå½¢ãã§ãã¦ãã¾ã£ã¦ããã newgem asdfhujiko -T rspecé©å½ã«-T rspecããããã¸ã§ã¯ããä½ã£ã¦ãããããtasksãã£ã¬ã¯ããªã¨specãã£ã¬ã¯ããªã®ãã¡ã¤ã«ãæã£ã¦ãã¦ArgsParserå ã«é ç½®ãããspecå ã®ååãasdfhujikoããå¤æ´ããã testãã£ã¬ã¯ããªä¸ã®Test::Unitãå ¨é¨åé¤ããã ãã£ã¬ã¯ããªå ã¯ãããªã£ã ArgsParser |-- History.txt |-- Manife
ä¼´ããã¨ããããããã¡ã¤ã³ã®æ©è½ã ã£ãããããããã§ããã å°ãåã以ä¸ã®è¨äºã§ããåç´ãªOAuthã³ã³ã·ã¥ã¼ãã®å®è£ ãè¡ãã¾ããã OAuthã³ã³ã·ã¥ã¼ãã®ä»çµã¿ã¨å®è£ ã Rubyç·¨ - ãã°ãããã¼ã ãã®å°ããªã©ã¤ãã©ãªã®ä½¿ãæ¹ã¯ä»¥ä¸ã®éãã§ãã require 'simple-oauth' simple_oauth = SimpleOAuth.new('COMSUMER-KEY', 'COMSUMER-SECRET', 'ACCESS-TOKEN', 'TOKEN-SECRET' ) response = simple_oauth.get('http://example.com/') response = simple_oauth.post('http://example.com/', :foo => 'bar') ããã§å ¨æ©è½ã§ãã*1 getãpostã¡ã½ããã§ã¯ãå é¨ã§Ne
I'm watching Francis Hwang's talk from RubyConf 2008 titled "Testing Heresies." He discusses his reasons for not using mock objects, and commits a common error when trashing mocks: he shows crappy examples which evidently serve as proof of why the technique sucks. To start, let's look at the two main arguments people make for why mocks suck: They duplicate the code under test Objects can get out o
TEST http://d.hatena.ne.jp/devbankh/201001ãã¢ãã¯ãã¹ã¿ãã使ã£ãå¹ççãªã¦ããããã¹ã http://d.hatena.ne.jp/devbankh/201002ãã¢ãã¯ã¨ã¹ã¿ãã®éã ã³ãã¥ãã±ã¼ã·ã§ã³ http://d.hatena.ne.jp/devbankh/20051124ãç°¡åãã¤å¹æçã«è©±ãããã« "ã¢ãã¯ãªãã¸ã§ã¯ã"ã¨ããè¨èã¯ããã¹ãã®ããã«æ¬ç©ã®ãªãã¸ã§ã¯ããã¾ããç¹æ®ãªãªãã¸ã§ã¯ãã表ãè¨èã¨ãã¦å®çããããããã¢ãã¯ã¨ããè¨èã¯å ã ã¹ã¿ãããã£ããã¼ã«ãããã®ã§ãªãã[ã¹ã¿ãã使ã£ãã®ã¨ã¯å¥ã®] ã¦ããããã¹ãæ¹æ³ãç¨ããããã®ãã®ãªã®ã ããã®è¨äºã§ã¯ãã¢ãã¯ãªãã¸ã§ã¯ãã®ãã¡ã³ã«å¥½ã¾ããç¸äºä½ç¨ä¸å¿ã®ãã¹ãã¨ãããè¡ãã¦ããç¶æ ä¸å¿ã®ãã¹ãã¹ã¿ã¤ã«ã¨ã®éãã説æããããã«ãã¢ãã¯ã¨ã¹ã¿ãã®éãã«ã¤ãã¦æãä¸ããã ç®æ¬¡
ä»äºã§ä½ã£ã¦ããRailsã¢ããªã«Cucumberãçªã£è¾¼ãã§ã¿ã¾ãããããã¯ç±ããããããååãã客ããã«è¦ãã¦åãã£ã¦ããããæ°ããã¾ãããã¶ãããã¡ããæºåã¯å¿ è¦ã ããåãå ¥ãä»æ§ããã¹ã¦ã客ããã«æ¸ãã¦ãããã¨ããã®ã¯é£ããã§ããã©*1ã ã¨ããããå°å ¥ã¯ãã¡ããããæè¿ã¯Nokogiriãå¿ è¦ã§ãããã¨Terminal.appã§--no-colorã¤ããã«å®è¡ããã¨Terminal.appãã²ã©ããã¨ã«ãªãã®ã§iTermãè¦ãã§ãã http://github.com/aslakhellesoy/cucumber/wikis/ruby-on-rails 2010-11-10 SEOçã«ããã®è¨äºãæ¸ãã¦ãã2å¹´ãããããªCucumberã®ä½¿ãæ¹ã調ã¹ã¾ããããã®ãã¦ãã¦ãé人åºçä¼ã«ã¦æ¬ã«ã¾ã¨ãã¾ããããããããã°ãã¡ããã©ããã http://tatsu-zine.com/bo
ä¹ ã ã«é¢ç½ãã¢ããä½ã£ãã SlowQueryLogger Railsã§ã¯ActiveRecordãå©ç¨ãã¦ã¬ã³ã¬ã³å¯è±ªããã°ã©ã ãæ¸ããã¡ãªãããé©åã«ã¤ã³ãã¯ã¹ãå¼µã£ã¦ããªãã¨ããã«éãããªãã®ã§ãRailsä¸ã§çºè¡ãããé ãã¯ã¨ãªããã®ã³ã°ããããã°ã©ã ãä½ã£ãã ActiveRecordã®åç §ç³»ã¯ã¨ãªãçºè¡ããã¡ã½ãããEXPLAINã«ããå®è¡è§£ææ å ±ãåå¾ããã®ã³ã°ãã¦ããé常ã®åç §ã¯ã¨ãªãçºè¡ããããã«æ¡å¼µããRailsä»å±ã®Unit::Testã®functionalãã¹ãã¾ãã¯RSpecã®ã³ã³ããã¼ã©ã¼ã®Specãã¡ã¤ã«ãå®è¡ãããæçµçã«ã¯ãfilesortãä¸æãã¼ãã«ã使ç¨ãã¦ããã¯ã¨ãªããã°ãã¡ã¤ã«ã«æ¸ãåºãããã ã¤ã¾ããfunctional testãå®ç¾©ãããã¡ã¤ã«ãRSpecã®controllerã®ã¹ããã¯ãã¡ã¤ã«ãããã°ç¹ã«ä½ãç¨æããå¿ è¦ã¯ãªãã ç¾å¨My
rcovã使ã£ã¦ã¦ããã¡ãã¡HTMLãè¦ãªãã¨ãããªãã®ãé¢åã¨æã£ã¦ã人ã¯ãæ¯éã¨ãã--gccããªãã·ã§ã³ã使ã£ã¦ã¿ããã ãã¡ãã¡HTMLè¦ãã®ããã©ãããã¨æã£ã¦ãã£ã¨åã«ä¿ºã追å ãããªãã·ã§ã³ã ãããã¾ãç¥ããã¦ãªãããã ã # a.rb def foo(x) if x >= 3 x+2 else x+1 end end require 'test/unit' class TestFoo < Test::Unit::TestCase def test_1 assert_equal(12, foo(10)) end end ãã¹ãæ¼ãã®é¨åãæ¨æºåºåã«åºåãããã ããã§ã¨ãã£ã¿ã®ä¸ã§å¿«é©ã«ã¸ã£ã³ãã§ããã ããã $ rcov --gcc /tmp/a.rb Loaded suite /usr/local/bin/rcov Started . Finished in 0.00071
ãªã³ã¯ã URL ã® HTML ãçæãã¦ããããã«ãã¡ã½ãã link_to ã url_for ãã¦ããããã¹ãã§ä½¿ããããã¨ããããããããªãããããã¯åºæ¬çã«ã³ã³ããã¼ã©ããã¥ã¼ã®ã³ã³ããã¹ãã§ä½¿ããã¨ãåæã«ãªã£ã¦ãããããã¦ããããã¹ãã§ã¯ãã®ã¾ã¾ã§ã¯ä½¿ããªãã次ã®ãããªå·¥å¤«ãå¿ è¦ã«ãªãã 1. ã¦ããããã¹ãã®å é ã§ãã«ãã¡ã½ããã®æ ¼ç´ããã¦ããã¢ã¸ã¥ã¼ã«ãã¤ã³ã¯ã«ã¼ã ãã¨ãã° EntryTest ã¨ããã¦ããããã¹ãã§ãlink_to ã url_for ã使ãããã¨ããã url_for 㯠ActionController::UrlWriter, link_to 㯠ActionController::UrlWriter ã«ããããã class EntryTest < Test::Unit::TestCase fixtures :entries include Ac
ããã³ã¾ãã¯ã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 ç´
ã·ã¹ãã éçºã«ããããã¹ãã®éè¦æ§ã¯è¨ãã«åã°ãªãããã大æµæéããªããªã£ã¦ãã¾ã£ã¦æ£å¸¸ç³»ã®ãã¹ãã ãã§çµãã£ã¦ãã¾ããã¨ã«ãªãã ããããã¨ããã¡ããç°å¸¸ç³»ã®å¦çã«ãªã£ãé端ãã·ã¹ãã ã¨ã©ã¼ãå¼ãèµ·ãããä½ããã¹ãããããã¯äºæãã¦ããåé¡ç¹ãå ¨ã¦ææ¡ã§ãããã©ããã ã ä»åç´¹ä»ãããªã¼ãã³ã½ã¼ã¹ã»ã½ããã¦ã§ã¢ã¯rcovãRubyåãã®ã½ã¼ã¹ã«ãã¬ãã¸ãã¼ã«ã ã ã«ãã¬ãã¸ãã¼ã«ã¨ã¯ã対象ã®ããã°ã©ã ã½ã¼ã¹ãå¦çãä¸å·¡ããä¸ã§éã£ãå ´æã¨éã£ã¦ããªãå ´æã¨ãè¦æ¥µãã¦ãããã½ããã¦ã§ã¢ã ãããã使ãã°éã£ã¦ããªãå ´æã¯å ã ä¸è¦ããã¾ãã¯ãã¹ããã¦ããªãå ´æãã®ã©ã¡ããã«åãããã¨ãã§ããã çµæã¯HTMLå½¢å¼ã§ã®ã¬ãã¼ãã®ä»ãæ¨æºåºåã§ãå¯è½ã ãå ¨ä½ã®ã³ã¼ãéã«å¯¾ããã«ãã¬ãã¸çãããããã¤ã³ããä½åéã£ããã¨ãã£ããã¨ãæ示ãã¦ãããã ãªããå ¬å¼ãµã¤ãã§ã¯Ruby on Railsã§ã
The Apache Tomcat 5.5 Servlet/JSP Container - JNDI Datasource HOW-TO Please note that JNDI resource configuration has changed somewhat between Tomcat 5.0.x and Tomcat 5.5.x. ã¨ãããã¨ã§ãJNDI使ç¨æã¯ãã¼ã¸ã§ã³ã«æ³¨æã JDBCãã©ã¤ãã®jarãã¡ã¤ã«ã¯ãTOMCATã®common/lib/é ä¸ã«ç½®ãã¦ãã RFPå®å ¨ããã¥ã¢ã« å®è·µç·¨ - RFPå®å ¨ããã¥ã¢ã« å®è·µç·¨ï¼ç®æ¬¡ï¼ï¼ITpro Amazon.co.jpï¼ RFP&ææ¡æ¸å®å ¨ããã¥ã¢ã« Amazon.co.jpï¼ RFPå ¥éâã¯ããã¦ã®ææ¡ä¾é ¼æ¸ [æåå½¹ã®æè¨]ã³ã¹ãåæ¸ãç®çã¨ããERPå°å ¥ã¯æåããªãï¼ITpro âãæ¥åããã»ã¹ã®æ¨æºåã¯ãæ¥åã®
This article was migrated from http://rails.office.drecom.jp/takiuchi/archive/158 é¦¬å ´ãããæ¸ãã¦ããã¤ãã¡ãã£ã¨ä¿®æ£ãããã®ã 1 desc 'Commit to the repository safely.' 2 task :commit => [ 3 :up, 4 :'db:migrate', 5 :test, 6 :'test:plugins', 7 ] do 8 if msg = ENV['M'] 9 msg.gsub!(/\"/, '\"') 10 system %Q{svn ci #{RAILS_ROOT} -m "#{msg}"} 11 else 12 system "svn ci #{RAILS_ROOT}" 13 end 14 end 15 16 des
I'm working on Edge Rails again doing some RESTful API stuff, so I'm watching the Rails commits fairly closely these days. Earlier today Tobi committed patch [6647] the long-awaited assert_difference and assert_no_difference test helpers. You can use them like so: def test_create_user login = "bob" name = "Bob Dobbs" assert_difference(User, :count, 1) do bob = User.create!(:login => login, :name =
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}