I have a application that is using rails 3.2.3 and spork 1.0.0rc2. When I run my cucumber test I get:
ActionView::Template::Error: undefined local variable or method `page_title'
Where page_title is defined in my application helper. I am not sure what broke them as it was working until the last bundle update.
Anyone having the same issue?
To fix this issue add these below lines in Spork.prefork block
full_names = Dir["#{Rails.root}/app/helpers/*.rb"]
full_names.collect do |full_name|
include Object.const_get(File.basename(full_name,'.rb').camelize)
end
Take a look at this thread https://github.com/sporkrb/spork-rails/issues/6#issuecomment-11105681 there are two solutions for this problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With