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
Post a Comment