John-Li/my_programs — comment on commit 883bf15dfacc3bd85a65c9db393d8beec99e2d21
File: book/arrays/2_dimentional/specs/tasks_spec.rb line 44
By gmile:

Passing an array with all it's rows directly to `#should` is not cool. Just declare the expectation somewhere earlier, and use it. For example:

```ruby
expected = [ ... ]

method_4(array_2d).should == expected
```
But let's go even further, optimizing the readability of code. You can rely your expectation on a `array_2d` if you really know what expectation should look like. Fortunately the problem statement includes direct instructions on that, so consider changing the expectation code to look like this:

```ruby
expected = [ array_2d[1], array_2d[0], array_2d[3], array_2d[2], array_2d[5], array_2d[4] ]

method_4(array_2d).should == expected
```