|
77 | 77 | end # describe handling loops in the origin Hashes
|
78 | 78 |
|
79 | 79 | describe 'recursing over arrays' do
|
80 |
| - let(:blah_list) { [ { :id => '1' }, { :id => '2' }, 'baz' ] } |
| 80 | + let(:blah_list) { [ { :foo => '1' }, { :foo => '2' }, 'baz' ] } |
81 | 81 | let(:h) { { :blah => blah_list } }
|
82 | 82 |
|
83 | 83 | context "when recursing over arrays is enabled" do
|
|
86 | 86 | end
|
87 | 87 |
|
88 | 88 | it { @ros.blah.length.should == 3 }
|
89 |
| - it { @ros.blah[0].id.should == '1' } |
90 |
| - it { @ros.blah[1].id.should == '2' } |
| 89 | + it { @ros.blah[0].foo.should == '1' } |
| 90 | + it { @ros.blah[1].foo.should == '2' } |
91 | 91 | it { @ros.blah_as_a_hash.should == blah_list }
|
92 | 92 | it { @ros.blah[2].should == 'baz' }
|
93 | 93 | end # when recursing over arrays is enabled
|
|
98 | 98 | end
|
99 | 99 |
|
100 | 100 | it { @ros.blah.length.should == 3 }
|
101 |
| - it { @ros.blah[0].should == { :id => '1' } } |
102 |
| - it { @ros.blah[0][:id].should == '1' } |
| 101 | + it { @ros.blah[0].should == { :foo => '1' } } |
| 102 | + it { @ros.blah[0][:foo].should == '1' } |
103 | 103 | end # when recursing over arrays is disabled
|
104 | 104 |
|
105 | 105 | end # recursing over arrays
|
|
144 | 144 | QUOTE
|
145 | 145 | @io = StringIO.new
|
146 | 146 | @ros.debug_inspect(@io)
|
147 |
| - @io.string.should == @output |
| 147 | + @io.string.should match /^a = "b"$/ |
| 148 | + @io.string.should match /^h1\.$/ |
| 149 | + @io.string.should match /^ a = "a"$/ |
| 150 | + @io.string.should match /^ h2\.$/ |
| 151 | + @io.string.should match /^ a = "b"$/ |
| 152 | + @io.string.should match /^ h1\.$/ |
| 153 | + @io.string.should match /^ a = "a"$/ |
| 154 | + @io.string.should match /^ h2\.$/ |
| 155 | + @io.string.should match /^ a = "b"$/ |
| 156 | + @io.string.should match /^ h1\.$/ |
| 157 | + @io.string.should match /^ a = "a"$/ |
| 158 | + @io.string.should match /^ h2\.$/ |
| 159 | + @io.string.should match /^ a = "b"$/ |
| <
8E4A
code>160 | + @io.string.should match /^ h1\.$/ |
| 161 | + @io.string.should match /^ a = "a"$/ |
| 162 | + @io.string.should match /^ h2\.$/ |
| 163 | + @io.string.should match /^ a = "b"$/ |
| 164 | + @io.string.should match /^ h1\.$/ |
| 165 | + @io.string.should match /^ a = "a"$/ |
| 166 | + @io.string.should match /^ h2\.$/ |
| 167 | + @io.string.should match /^ a = "b"$/ |
| 168 | + @io.string.should match /^ h1\.$/ |
| 169 | + @io.string.should match /^ a = "a"$/ |
| 170 | + @io.string.should match /^ h2\.$/ |
| 171 | + @io.string.should match /^ \(recursion limit reached\)$/ |
148 | 172 | end
|
149 | 173 | end # additionnel features
|
150 | 174 |
|
|
0 commit comments