0
給出下列代碼:rspec的 - 如何有沒有實例都「描述」和「它」
require 'rspec'
require_relative 'dec_to_hex'
describe "Should convert 20 to 32" do
it "should convert correctly" do
converter("20").should == 32
end
end
爲什麼我不能有實際的試驗,無論是
describe "Should convert 20 to 32" do
converter("20").should == 32
end
# This simply doesn't run the test, it gets ignored!
或
it "should convert correctly" do
converter("20").should == 32
end
# This gives undefined method `it'