ruby - Using a rails engine in rspec -


how can create rails engine inside of spec test? using test gem. here trying

module zan   class engine < ::rails::engine     isolate_namespace myengine   end end 

and getting

 failure/error: class engine < ::rails::engine  nameerror:    uninitialized constant rails 

i've tried bundle exec rake spec same result.

you need add rails dependency of gem, , require in spec helper:

# your_gem.gemspec  spec.add_development_dependency 'rails'   # spec_helper.rb  require 'rubygems' require 'bundler/setup' 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -