æ¨æ¥ã®è¨äº ç¶ã»Rails 3.x æ代ã®ãã¹ããã¬ã¼ã ã¯ã¼ã¯ ã§ã¯ãRails ã§ä½¿ç¨ã§ãããã¹ããã¬ã¼ã ã¯ã¼ã¯ã®åºç¤ç¥èã¨ç¸äºé¢ä¿ã«ã¤ãã¦ã¾ã¨ãã¾ããã ä»æ¥ã¯ãTest::Unit 㨠RSpec 㨠Shoulda ãå ·ä½çã«æ¯è¼ãã¦ã¿ããã¨æãã¾ãï¼Cucumber ã«ã¤ãã¦ã¯ãå¥ã®æ©ä¼ã«â¦ï¼ã ä¾ã¨ãã¦ãå¤æ° @total ã«æåå '100' ãã»ããããã¨ãå¼ @total.to_i 㯠100 ãè¿ããã¨ãããã¹ãã±ã¼ã¹ãèãã¾ãããã ç´ç²ãª Test::Unit ã§ã¯ãã®ããã«æ¸ãã¾ãã require 'test/unit' class SimpleTest < Test::Unit::TestCase def test_should_return_100 @total = '100' assert_equal(100, @total.to_i) end end R
{{#tags}}- {{label}}
{{/tags}}