sphinx 0.9.9.2117 → 0.9.10

Sign up to get free protection for your applications and to get access to all the features.
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