Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Enumerable specs entirely from rubyspec
- Loading branch information
1 parent
047b8ef
commit d15a61a
Showing
34 changed files
with
70 additions
and
1,125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
opal_filter "Enumerable#drop" 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" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
opal_filter "Enumerable#drop_while" do | ||
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" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
opal_filter "Enumerable#each_slice" do | ||
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" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
opal_filter "Enumerable#each_with_index" do | ||
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" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
opal_filter "Enumerable#each_with_object" do | ||
fails "Enumerable#each_with_object returns an enumerator if no block" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
opal_filter "Enumerable#find_index" do | ||
fails "Enumerable#find_index returns an Enumerator if no block given" | ||
fails "Enumerable#find_index gathers initial args as elements when each yields multiple" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
opal_filter "Enumerable#grep" do | ||
fails "Enumerable#grep can use $~ in the block when used with a Regexp" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
opal_filter "Enumerable#group_by" do | ||
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" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
opal_filter "Enumerable#take" do | ||
fails "Enumerable#take requires an argument" | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.