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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -