@@ -10,4 +10,11 @@ module FeatureSpecHelper
     setup_mock_auth(:myusa, user)
     visit '/auth/myusa'
   end
+
+  # adapted from http://stackoverflow.com/a/25047358
+  def fill_in_selectized(key, *values)
+    values.flatten.each do |value|
+      page.execute_script("$('##{key}').selectize()[0].selectize.setValue('#{value}')")
+    end
+  end
 end
module FeatureSpecHelper
  # requires IntegrationSpecHelper

  def login_with_oauth
    user = FactoryGirl.create(:user)
    login_as(user)
  end

  def login_as(user)
    setup_mock_auth(:myusa, user)
    visit '/auth/myusa'
  end
end

let's put this in the `observer_spec` file as a method inside the `describe` block so it's scoped. Easier to see what's going on that way!