重複の可能性:
rspecでモジュールをテストする
現在、次のようにrspecを使用してモジュールを正常にテストしています。
require 'spec_helper'
module Services
module AppService
describe AppService do
describe "authenticate" do
it "should authenticate the user" do
pending "authenticate the user"
end
end
end
end
end
私のモジュールはapp/services / services.rb app / services/app_service.rbにあります
ただし、仕様で名前空間を宣言せずにモジュールをテストするためのより洗練されたソリューションはありますか?それは私の仕様にしっかりと結びついていて、変更を加えることは多くの頭痛の種になると思います。