我正在使用rspec-rails v3.4.2。我看到網上很多例子如下 describe "My Test Suite" do
# ...
end
feature "My Awesome Feature" do
# ...
end
而且我有FactoryGirl類似的東西,寫create(:model)而不是鍵入完整的版本,FactoryGirl.create(:m
一直想詢問此一段時間了......如此頻繁,當我運行一個測試,我會得到這樣的錯誤: bundle exec rspec spec/features/admin/2_email_maintenances_spec.rb:32 -b
Run options: include {:locations=>{"./spec/features/admin/2_email_maintenances_spec.
我有一個類 Gate < ActiveRecord::Base
self.inheritance_column = :kindof
# some methods
end
# and derived
MoneyHaters < Gate
# some overloaded methods
end
與類型的列:kindof爲STI。 杜寧測試我想創建2-3個孩子。主要是因爲每