|
49 | 49 |
|
50 | 50 | it "passes through options to the attribute" do
|
51 | 51 | expect(ThinkingSphinx::RealTime::Attribute).to receive(:new).
|
52 |
| - with(column, :as => :other_name).and_return(attribute) |
| 52 | + with(column, { :as => :other_name }).and_return(attribute) |
53 | 53 |
|
54 | 54 | instance.has column, :as => :other_name
|
55 | 55 | end
|
|
84 | 84 |
|
85 | 85 | it "passes through options to the field" do
|
86 | 86 | expect(ThinkingSphinx::RealTime::Field).to receive(:new).
|
87 |
| - with(column, :as => :other_name).and_return(field) |
| 87 | + with(column, { :as => :other_name }).and_return(field) |
88 | 88 |
|
89 | 89 | instance.indexes column, :as => :other_name
|
90 | 90 | end
|
|
112 | 112 |
|
113 | 113 | it "adds the _sort suffix to the field's name" do
|
114 | 114 | expect(ThinkingSphinx::RealTime::Attribute).to receive(:new).
|
115 |
| - with(column, :as => :col_sort, :type => :string). |
| 115 | + with(column, { :as => :col_sort, :type => :string }). |
116 | 116 | and_return(attribute)
|
117 | 117 |
|
118 | 118 | instance.indexes column, :sortable => true
|
119 | 119 | end
|
120 | 120 |
|
121 | 121 | it "respects given aliases" do
|
122 | 122 | expect(ThinkingSphinx::RealTime::Attribute).to receive(:new).
|
123 |
| - with(column, :as => :other_sort, :type => :string). |
| 123 | + with(column, { :as => :other_sort, :type => :string }). |
124 | 124 | and_return(attribute)
|
125 | 125 |
|
126 | 126 | instance.indexes column, :sortable => true, :as => :other
|
127 | 127 | end
|
128 | 128 |
|
129 | 129 | it "respects symbols instead of columns" do
|
130 | 130 | expect(ThinkingSphinx::RealTime::Attribute).to receive(:new).
|
131 |
| - with(:title, :as => :title_sort, :type => :string). |
| 131 | + with(:title, { :as => :title_sort, :type => :string }). |
132 | 132 | and_return(attribute)
|
133 | 133 |
|
134 | 134 | instance.indexes :title, :sortable => true
|
|
0 commit comments