     i = randInt(options.length)
     @set_option(test_name, options[i])
 
-window.CircleABTestVM = new ABTestViewModel
+CircleABTestVM = new ABTestViewModel
+
+# Global variable
+exports.AB = CircleABTestVM.ab_tests()
 
 ko.bindingHandlers.ab_test =
   init: (el, valueAccessor) =>

# Make sure _ab_test_definitions is defined. Either define it here,
# or define it window._ab_test_definitions. Format is 'test-name': [options...]
#
# Example:
# _ab_test_definitions =
#   'daniel-test': ['option1', 'option2']
#   'daniel-test-2': ['option1', 'option2', 'option3']
#
# Caveats:
#   Don't set null as an option.
#   You can't change the options, you need to define a new test
#
# Example usage in view:
#   %p{href: "#", data-bind: "ab_test: {test: 'Show beta text', option: true}"}
#     This is the text that will show up if option is set to true by KissMetrics!
#   %p{href: "#", data-bind: "ab_test: {test: 'Show beta text', option: false}"}
#     This is the text that will show up if option is set to false by KissMetrics!

## Add your A/B tests here
_ab_test_definitions =
  daniel_test_2: [true, false]

cookie_prefix = "ab_test_"
$.cookie.json = true

    option = valueAccessor().option

    try
      ab_tests = AB

      display_p = ab_tests[test] is option

