Skip to content

Commit 910189b

Browse files
committedOct 30, 2013
Run struct specs from rubyspec
1 parent 25b1c64 commit 910189b

File tree

6 files changed

+16
-59
lines changed

6 files changed

+16
-59
lines changed
 

‎spec/corelib/struct/fixtures/classes.rb

-26
This file was deleted.

‎spec/corelib/struct/initialize_spec.rb

-10
This file was deleted.

‎spec/corelib/struct/new_spec.rb

-23
This file was deleted.

‎spec/filters/bugs/struct.rb

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
opal_filter "Struct" do
2+
fails "Struct#initialize can be overriden"
3+
fails "Struct.new fails with too many arguments"
4+
fails "Struct.new creates a constant in subclass' namespace"
5+
fails "Struct.new raises a TypeError if object is not a Symbol"
6+
fails "Struct.new raises a TypeError if object doesn't respond to to_sym"
7+
fails "Struct.new fails with invalid constant name as first argument"
8+
fails "Struct.new does not create a constant with symbol as first argument"
9+
fails "Struct.new creates a new anonymous class with nil first argument"
10+
fails "Struct.new calls to_str on its first argument (constant name)"
11+
end

‎spec/filters/unsupported/private_methods.rb

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
fails "Hash#initialize_copy is private"
77
fails "Hash#initialize is private"
88

9+
fails "Struct#initialize is private"
10+
911
fails "Defining an 'initialize' method sets the method's visibility to private"
1012
fails "Defining an 'initialize_copy' method sets the method's visibility to private"
1113

‎spec/rubyspecs

+3
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,9 @@ core/string/upcase_spec
247247

248248
core/symbol/to_proc_spec
249249

250+
core/struct/initialize_spec
251+
core/struct/new_spec
252+
250253
core/class/new_spec
251254

252255
core/time/mktime_spec

0 commit comments

Comments
 (0)
Please sign in to comment.