sphinx 0.9.9.2117 → 0.9.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/spec/spec_helper.rb DELETED
@@ -1,24 +0,0 @@
1
- require File.dirname(__FILE__) + '/../init'
2
-
3
- # Helper exception class to omit real dialogue between client and server
4
- class SphinxSpecError < StandardError; end
5
-
6
- # Runs PHP fixture to get request dump
7
- def sphinx_fixture(name)
8
- `php #{File.dirname(__FILE__)}/fixtures/#{name}.php`
9
- end
10
-
11
- def sphinx_create_client
12
- @sphinx = Sphinx::Client.new
13
- @sock = mock('SocketMock')
14
-
15
- servers = @sphinx.instance_variable_get(:@servers)
16
- servers.first.stub(:get_socket => @sock, :free_socket => nil)
17
- @sphinx.stub!(:parse_response).and_raise(SphinxSpecError)
18
- return @sphinx
19
- end
20
-
21
- def sphinx_safe_call
22
- yield
23
- rescue SphinxSpecError
24
- end