You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't really know where to file this; it's an interaction between env.js and Rails, basically, but it bit me in a Capybara context.
I have a Cucumber scenario that fills out a simple form, attaches a JPEG file to the form input, and submits it. It passes in Rack::Test, but when I submit the form using env.js, I get a lot of "Exception while dispatching events: super: no superclass method `require' for Object:Class" (stack trace below).
The 'require' is handled (intercepted?) by ActiveSupport::Dependencies::Loadable:
def require(file, *)
load_dependency(file) { super }
end
... which fails because Object has no superclass, I guess.
I can imagine considering this a bug in Rails, but I'm not sure. It looks like I can work around it by uploading PNGs (this theory is untested), or at a mild performance cost, capybara-envjs could require base64 preemptively instead of waiting for form.js to do it. But maybe there's a better way?
I'm using, among other things, ruby 1.8.7-p299, rails 3.0.3, capybara 0.4.0, capybara-envjs 0.4.0, johnson 2.0.0pre3, envjs 0.3.8, and cucumber 0.10.0.
I don't really know where to file this; it's an interaction between env.js and Rails, basically, but it bit me in a Capybara context.
I have a Cucumber scenario that fills out a simple form, attaches a JPEG file to the form input, and submits it. It passes in Rack::Test, but when I submit the form using env.js, I get a lot of "Exception while dispatching events: super: no superclass method `require' for Object:Class" (stack trace below).
The offending line is in form.js:
The 'require' is handled (intercepted?) by ActiveSupport::Dependencies::Loadable:
... which fails because Object has no superclass, I guess.
I can imagine considering this a bug in Rails, but I'm not sure. It looks like I can work around it by uploading PNGs (this theory is untested), or at a mild performance cost, capybara-envjs could require base64 preemptively instead of waiting for form.js to do it. But maybe there's a better way?
I'm using, among other things, ruby 1.8.7-p299, rails 3.0.3, capybara 0.4.0, capybara-envjs 0.4.0, johnson 2.0.0pre3, envjs 0.3.8, and cucumber 0.10.0.
The text was updated successfully, but these errors were encountered: