Skip to content

Commit

Permalink
Group all Enumerable filters together
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 20, 2013
1 parent d15a61a commit 5968caa
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 45 deletions.
35 changes: 35 additions & 0 deletions spec/filters/bugs/enumerable.rb
@@ -0,0 +1,35 @@
opal_filter "Enumerable" do
fails "Enumerable#drop passed a number n as an argument raise ArgumentError if n < 0"
fails "Enumerable#drop passed a number n as an argument tries to convert n to an Integer using #to_int"
fails "Enumerable#drop passed a number n as an argument raises a TypeError when the passed n can be coerced to Integer"

fails "Enumerable#drop_while returns an Enumerator if no block given"
fails "Enumerable#drop_while passes elements to the block until the first false"
fails "Enumerable#drop_while will only go through what's needed"
fails "Enumerable#drop_while gathers whole arrays as elements when each yields multiple"

fails "Enumerable#each_slice tries to convert n to an Integer using #to_int"
fails "Enumerable#each_slice raises an Argument Error if there is not a single parameter > 0"
fails "Enumerable#each_slice yields only as much as needed"
fails "Enumerable#each_slice gathers whole arrays as elements when each yields multiple"
fails "Enumerable#each_slice returns an enumerator if no block"

fails "Enumerable#each_with_index provides each element to the block"
fails "Enumerable#each_with_index provides each element to the block and its index"
fails "Enumerable#each_with_index binds splat arguments properly"
fails "Enumerable#each_with_index passes extra parameters to each"

fails "Enumerable#each_with_object returns an enumerator if no block"

fails "Enumerable#find_index returns an Enumerator if no block given"
fails "Enumerable#find_index gathers initial args as elements when each yields multiple"
fails "Enumerable#grep can use $~ in the block when used with a Regexp"

fails "Enumerable#group_by returns a hash without default_proc"
fails "Enumerable#group_by returns an Enumerator if called without a block"
fails "Enumerable#group_by gathers whole arrays as elements when each yields multiple"

fails "Enumerable#sort_by returns an Enumerator when a block is not supplied"

fails "Enumerable#take requires an argument"
end
5 changes: 0 additions & 5 deletions spec/filters/bugs/enumerable/drop.rb

This file was deleted.

6 changes: 0 additions & 6 deletions spec/filters/bugs/enumerable/drop_while.rb

This file was deleted.

7 changes: 0 additions & 7 deletions spec/filters/bugs/enumerable/each_slice.rb

This file was deleted.

6 changes: 0 additions & 6 deletions spec/filters/bugs/enumerable/each_with_index.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/filters/bugs/enumerable/each_with_object.rb

This file was deleted.

4 changes: 0 additions & 4 deletions spec/filters/bugs/enumerable/find_index.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/filters/bugs/enumerable/grep.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/filters/bugs/enumerable/group_by.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/filters/bugs/enumerable/take.rb

This file was deleted.

3 changes: 0 additions & 3 deletions spec/filters/bugs/enumerable_sort_by.rb

This file was deleted.

0 comments on commit 5968caa

Please sign in to comment.