30
我在想,是否before
(如下所示)與RSpec中的before :all
相同。有時候既沒有指定:each
也沒有指定:all
,並且它使我對before
的實際操作感到困惑。:all?
require 'spec_helper'
describe "this is a description" do
before do # vs. before :all or before :each
# do something...
end
end
如果任何人能解釋差異,如果有的話,將不勝感激。謝謝!