burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

Zeus Namespace Rspec #609

Closed natesire closed 7 years ago

natesire commented 7 years ago

Zeus can't find Rspec class when using Rspec's shared examples feature. It looks like spec_helper.rb drops the Rails class.

Edited Worked Around it by...

Added require 'rspec/rails' to spec_helper.rb

https://github.com/burke/zeus/issues/474

Edited #2 The workaround is causing a new error. uninitialized constant ActionView::Template::Handlers::ERB::ENCODING_FLAG (NameError)

Work around to that. http://stackoverflow.com/questions/4429068/getting-an-unitialized-constant-error-with-rspec-have-no-idea-whats-causing-it

require 'rails/all'

sideshowcoder commented 7 years ago

Not sure the 2nd part is really a zeus issue, shouldn't require 'rails/all' be what you do? Sorry if I'm confused here but at least this is what I have in my apps, unless I explicitly require only parts of rails.

For the first part, this is really not nice, but I think the best way to fix this is some documentation for now, I find it awkward how rspec generates the helper in a way which makes it dependent on the Rspec being defined before the helper is loaded, but I guess it is how it is, as there is already issue #474 to keep track of this I would close this for now, feel free to reopen if you think there is a difference to #474