diff --git a/test/helper.rb b/test/helper.rb
index <HASH>..<HASH> 100644
--- a/test/helper.rb
+++ b/test/helper.rb
@@ -137,7 +137,7 @@ module Juno
     def marshal_error
       # HACK: Marshalling structs in rubinius without class name throws
       # NoMethodError (to_sym). TODO: Create an issue for rubinius!
-      RUBY_ENGINE == 'rbx' ? NoMethodError : TypeError
+      Object.const_defined?(:RUBY_ENGINE) && RUBY_ENGINE == 'rbx' ? NoMethodError : TypeError
     end
 
     it "refuses to #[] from keys that cannot be marshalled" do
RUBY_ENGINE is not defined on <I>