我在所有的類中都使用了g記錄器。 我想每個MSG與類名和方法名開始像這樣: Class_name::Method_name
這就是我現在做的: class FOO
def initialize
end
def bar
msg_prefix = "#{self.class}::#{__method__}"
... some code ...
@logeer
我寫了一個腳本,從下面的網站自動下載文件: #Automatically download files to a given folder profile settings
#---------------------------------------------------------------
profile = Selenium::WebDriver::Firefox::Profil
ruby/rspec的新手,試圖測試某個方法是否引發異常。我可能會完全錯誤地做這件事。 #require 'rspec'
describe "TestClass" do
it "should raise exception when my method is called" do
test = Test.new
test.should_receive(:my_