This example is called "stock". Use your own name instead.
- Setup new project:
rails plugin new stock --mountable -T --dummy-path=spec/dummy - Edit gemspec
- Edit engine.rb
- Install RSpec:
bundle installrails generate rspec:install - Make edits to spec/rails_helper.rb according to: http://blog.honeybadger.io/rails4-engine-controller-specs/
- Create your engine. See example model, concept and test
- Create migrations and run
rake db:migrate - Run
rspecfor tests orspec/dummy/bin/rails sfor running test app
It looks as if the pivotal element is the
Engine::activatemethod. If we provide that behaviour intrailblazer-railsand usetrailblazer-loaderinstead of your manualrequires, it should all be good.