実行するとrspec spec/models
結果はOKです。
しかし、私がsporkを使用すると、マクロが必要なすべてのテスト ( likeit { should validate_presence_of(:title) }
が使用され、次のようなエラーで失敗します:undefined method 'validate_presence_of' for ...
私が使う:
rails (3.0.0)
shoulda (2.11.3)
spork (0.8.4)
rspec-rails (>= 2.0.0.beta.22)
スペック/spec_helper.rb:
「ルビジェム」が必要 「スポーク」が必要 Spork.prefork する # このファイルは、「rails generate rspec:install」を実行すると spec/ にコピーされます ENV["RAILS_ENV"] ||= 'テスト' require File.expand_path("../../config/environment", __FILE__) 「rspec/rails」が必要 「すべき」を要求する ...