|
290 | 290 | end
|
291 | 291 | end
|
292 | 292 |
|
293 |
| - it "#ancestors_and_self should return the documents ancestors and itself" do |
294 |
| - node(:subchild).ancestors_and_self.to_a.should == [node(:root), node(:child), node(:subchild)] |
| 293 | + describe '#ancestors_and_self' do |
| 294 | + it "should return the documents ancestors and itself" do |
| 295 | + node(:subchild).ancestors_and_self.to_a.should == [node(:root), node(:child), node(:subchild)] |
| 296 | + end |
295 | 297 | end
|
296 | 298 |
|
297 | 299 | describe '#ancestor_of?' do
|
|
306 | 308 | end
|
307 | 309 |
|
308 | 310 | describe 'descendants' do
|
309 |
| - it "#descendants should return the documents descendants" do |
310 |
| - node(:root).descendants.to_a.should =~ [node(:child), node(:other_child), node(:subchild)] |
| 311 | + describe '#descendants' do |
| 312 | + it "should return the documents descendants" do |
| 313 | + node(:root).descendants.to_a.should =~ [node(:child), node(:other_child), node(:subchild)] |
| 314 | + end |
311 | 315 | end
|
312 | 316 |
|
313 |
| - it "#descendants_and_self should return the documents descendants and itself" do |
314 |
| - node(:root).descendants_and_self.to_a.should =~ [node(:root), node(:child), node(:other_child), node(:subchild)] |
| 317 | + describe '#descendants_and_self' do |
| 318 | + it "should return the documents descendants and itself" do |
| 319 | + node(:root).descendants_and_self.to_a.should =~ [node(:root), node(:child), node(:other_child), node(:subchild)] |
| 320 | + end |
315 | 321 | end
|
316 | 322 |
|
317 | 323 | describe '#descendant_of?' do
|
|
328 | 334 | end
|
329 | 335 |
|
330 | 336 | describe 'siblings' do
|
331 |
| - it "#siblings should return the documents siblings" do |
332 |
| - node(:child).siblings.to_a.should == [node(:other_child)] |
| 337 | + describe '#siblings' do |
| 338 | + it "should return the documents siblings" do |
| 339 | + node(:child).siblings.to_a.should == [node(:other_child)] |
| 340 | + end |
333 | 341 | end
|
334 | 342 |
|
335 |
| - it "#siblings_and_self should return the documents siblings and itself" do |
336 |
| - node(:child).siblings_and_self.should be_kind_of(Mongoid::Criteria) |
337 |
| - node(:child).siblings_and_self.to_a.should == [node(:child), node(:other_child)] |
| 343 | + describe '#siblings_and_self' do |
| 344 | + it "should return the documents siblings and itself" do |
| 345 | + node(:child).siblings_and_self.should be_kind_of(Mongoid::Criteria) |
| 346 | + node(:child).siblings_and_self.to_a.should == [node(:child), node(:other_child)] |
| 347 | + end |
338 | 348 | end
|
339 | 349 |
|
340 | 350 | describe '#sibling_of?' do
|
|
0 commit comments