blob: 68a5bb9a861c0f1830211ef31a8fa9c20690bf74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
Feature: Keeping AR::Base.find arguments in search calls
To keep things as streamlined as possible
Thinking Sphinx
Should respect particular arguments to AR::Base.find calls
Scenario: Respecting the include option
Given Sphinx is running
And I am searching on posts
Then I should get 1 result
When I get the first comment
And I track queries
And I compare comments
Then I should have 1 query
When I include comments
Then I should get 1 result
When I track queries
And I compare comments
Then I should have 0 queries
Scenario: Respecting the include option without using a specific model
Given Sphinx is running
And I search for "Hello World"
Then I should get 1 result
When I get the first comment
And I track queries
And I compare comments
Then I should have 1 query
When I include comments
Then I should get 1 result
When I track queries
And I compare comments
Then I should have 0 queries
Scenario: Respecting the select option
Given Sphinx is running
And I am searching on posts
Then I should get 1 result
And I should not get an error accessing the subject
When I select only content
Then I should get 1 result
And I should get an error accessing the subject
Scenario: Respecting the select option without using a specific model
Given Sphinx is running
When I search for "Hello World"
Then I should get 1 result
And I should not get an error accessing the subject
When I select only content
Then I should get 1 result
And I should get an error accessing the subject
|