Skip to content

Instantly share code, notes, and snippets.

@ktopping
Created February 15, 2010 17:15
Show Gist options
  • Save ktopping/304801 to your computer and use it in GitHub Desktop.
Save ktopping/304801 to your computer and use it in GitHub Desktop.
test "sunspot available" do
begin
# Search for instances of "String". The String class will always
# exist, so I use it in order to make this test simpler. It then
# has no dependency on my application classes.
s = Sunspot.search(String) {}
rescue
assert false, "Cannot connect to solr server #{Sunspot.config.solr.url}\n#{$!}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment