私はインストールジェネレータを含むsimpe gemを作成しますが、ジェネレータはうまく動作しますが、今はrspecを使ってテストしたいと思います。私はこのgemを試してみてください。 /stuff/work/my_projects/rosalie/lib/rosalie/engine.rb:2:in ` ':初期化されていないrspecを使ったテストエンジンジェネレータ
require 'genspec'
require 'rosalie'
describe :install_generator do
it "should generate model" do
subject.should generate("message.rb")
end
end
ロザリーは今、私はそれを実行すると、私はエラーを得た、5月の宝石の名前です。定数Rosalie :: Rails(NameError)
私のエンジン.rbコードは:
module Rosalie
class Engine < Rails::Engine
initializer "rosalie.models.messageable" do
ActiveSupport.on_load(:active_record) do
include Rosalie::Models::Messageable
end
end
end
end
誰でもこの問題を解決できますか?