   (:require fs)
   (:use midje.sweet))
 
-(declare eval ruby)
+(declare eval ruby get-class get-module)
 
 (defn new-runtime []
   (let [config (doto (org.jruby.RubyInstanceConfig.)

  nil [n]
  (-> (ruby) (.getNil)))

(fact "conversions work"
  (->ruby nil) => (eval "nil")
  (->ruby "a string") => (eval "'a string'")

  (->ruby [5 6 7]) => (eval "[5, 6, 7]")
  (->ruby {5 6}) => (eval "{5 => 6}")
  (class (eval ":foo")) => org.jruby.RubySymbol
  (->ruby (org.bson.types.ObjectId. sample-objectid-string)) => (eval (format "BSON::ObjectId::from_string '%s'" sample-objectid-string))

  ;; complex nested structures
  (->ruby [:foo "bar" 5 nil]) => (eval "[:foo, 'bar', 5, nil]")
