work_test.rb

来自「本书源码对于学习RUBY网络编程语言非常有帮助。」· RB 代码 · 共 28 行

RB
28
字号
require File.dirname(__FILE__) + '/../test_helper'class WorkTest < Test::Unit::TestCase  fixtures :works, :instruments, :instruments_works  def test_nice_title    w = works(:test_2)    assert_equal(w.nice_title, "Symphony #3 in C minor, op. 78, for orchestra")    w = works(:test_3)    assert_equal(w.nice_title, "Suite #1 in G major, BWV1007, for cello")  end  def test_nice_instruments    w = works(:test_0)    assert_equal(w.nice_instruments, "cello and piano")    w = works(:test_1)    assert_equal(w.nice_instruments, "violin, cello, and piano")  end  def test_century    assert_equal(works(:test_1).century, "18th century")  end  def test_period    assert_equal(works(:test_2).period, "Romantic")  endend

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?