Skip to content

Commit

Permalink
Clean up some rubyspec filters
Browse files Browse the repository at this point in the history
  • Loading branch information
adambeynon committed Sep 18, 2013
1 parent 438012d commit 20d55fb
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 19 deletions.
5 changes: 0 additions & 5 deletions spec/filters/bugs/array.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions spec/filters/bugs/array/flatten.rb
@@ -1,9 +1,18 @@
opal_filter "Array#flatten" do
fails "Array#flatten does not call flatten on elements"
fails "Array#flatten raises an ArgumentError on recursive arrays"
fails "Array#flatten flattens any element which responds to #to_ary, using the return value of said method"
fails "Array#flatten returns subclass instance for Array subclasses"
fails "Array#flatten with a non-Array object in the Array ignores the return value of #to_ary if it is nil"
fails "Array#flatten with a non-Array object in the Array raises a TypeError if the return value of #to_ary is not an Array"
fails "Array#flatten raises a TypeError when the passed Object can't be converted to an Integer"
fails "Array#flatten tries to convert passed Objects to Integers using #to_int"
end

opal_filter "Array#flatten!" do
fails "Array#flatten! does not call flatten! on elements"
fails "Array#flatten! raises an ArgumentError on recursive arrays"
fails "Array#flatten! flattens any elements which responds to #to_ary, using the return value of said method"
fails "Array#flatten! raises a TypeError when the passed Object can't be converted to an Integer"
fails "Array#flatten! tries to convert passed Objects to Integers using #to_int"
end
File renamed without changes.
File renamed without changes.
14 changes: 0 additions & 14 deletions spec/filters/bugs/array_flatten.rb

This file was deleted.

3 changes: 3 additions & 0 deletions spec/filters/bugs/language/array.rb
@@ -1,3 +1,6 @@
opal_filter "array" do
fails "The unpacking splat operator (*) when applied to a non-Array value attempts to coerce it to Array if the object respond_to?(:to_a)"
fails "The unpacking splat operator (*) returns a new array containing the same values when applied to an array inside an empty array"
fails "The unpacking splat operator (*) unpacks the start and count arguments in an array slice assignment"
fails "The unpacking splat operator (*) unpacks arguments as if they were listed statically"
end

0 comments on commit 20d55fb

Please sign in to comment.