Skip to content

Commit f55b77e

Browse files
committedOct 29, 2013
Group all private_method filters together
1 parent 71d5e42 commit f55b77e

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed
 

Diff for: ‎spec/filters/bugs/array.rb

-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
fails "Array#initialize with (array) calls #to_ary to convert the value to an array"
9191
fails "Array#initialize raises a RuntimeError on frozen arrays"
9292
fails "Array#initialize preserves the object's identity even when changing its value"
93-
fails "Array#initialize is private"
9493

9594
fails "Array#insert tries to convert the passed position argument to an Integer using #to_int"
9695

Diff for: ‎spec/filters/bugs/delegate.rb

-5
This file was deleted.

Diff for: ‎spec/filters/bugs/language.rb

-8
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,7 @@
122122
fails "A singleton method definition can be declared for a global variable"
123123
fails "A singleton method definition can be declared for an instance variable"
124124
fails "A singleton method definition can be declared for a local variable"
125-
fails "Defining an 'initialize' method sets the method's visibility to private"
126-
fails "Defining an 'initialize_copy' method sets the method's visibility to private"
127125

128-
fails "The defined? keyword when called with a method name having a module as a receiver returns nil if the method is private"
129126
fails "The defined? keyword for a scoped constant returns nil when an undefined constant is scoped to a defined constant"
130127
fails "The defined? keyword for a top-level scoped constant returns nil when an undefined constant is scoped to a defined constant"
131128

@@ -240,11 +237,8 @@
240237
fails "The return keyword when passed a splat returns an array when used as a splat"
241238
fails "The return keyword in a Thread raises a LocalJumpError if used to exit a thread"
242239

243-
fails "Invoking a private getter method does not permit self as a receiver"
244240
fails "Invoking a method with manditory and optional arguments raises an ArgumentError if too many values are passed"
245241
fails "Invoking a method with optional arguments raises ArgumentError if extra arguments are passed"
246-
# fails "Invoking a method passes a literal hash without curly braces or parens"
247-
# fails "Invoking a method passes literal hashes without curly braces as the last parameter"
248242
fails "Invoking a method raises a SyntaxError with both a literal block and an object as block"
249243
fails "Invoking a method with an object as a block uses 'to_proc' for coercion"
250244

@@ -338,8 +332,6 @@
338332
fails "The yield call taking multiple arguments with a splat does not pass an argument value if the splatted argument is nil"
339333

340334
fails "The defined? keyword when called with a method name without a receiver returns nil if the method is not defined"
341-
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private"
342-
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is protected"
343335
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is not defined"
344336
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the class is not defined"
345337
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the subclass is not defined"

Diff for: ‎spec/filters/bugs/set.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
opal_filter "Set" do
2-
fails "Set#initialize is private"
32
fails "Set#== returns true when the passed Object is a Set and self and the Object contain the same elements"
43
fails "Set#== does not depend on the order of nested Sets"
54
fails "Set#merge raises an ArgumentError when passed a non-Enumerable"

Diff for: ‎spec/filters/bugs/singleton.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
opal_filter "Singleton" do
2-
fails "Singleton.allocate is a private method"
32
fails "Singleton#_dump returns an empty string"
43
fails "Singleton#_dump returns an empty string from a singleton subclass"
54
fails "Singleton.instance returns an instance of the singleton's clone"
65
fails "Singleton.instance returns the same instance for multiple class to instance on clones"
7-
fails "Singleton.new is a private method"
86
end

Diff for: ‎spec/filters/unsupported/private_methods.rb

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
opal_filter "Private methods" do
2+
fails "Array#initialize is private"
3+
fails "The defined? keyword when called with a method name having a module as a receiver returns nil if the method is private"
4+
5+
fails "Defining an 'initialize' method sets the method's visibility to private"
6+
fails "Defining an 'initialize_copy' method sets the method's visibility to private"
7+
8+
fails "Invoking a private getter method does not permit self as a receiver"
9+
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is private"
10+
fails "The defined? keyword when called with a method name having a module as receiver returns nil if the method is protected"
11+
12+
fails "SimpleDelegator.new doesn't forward private method calls"
13+
fails "SimpleDelegator.new doesn't forward private method calls even via send or __send__"
14+
fails "SimpleDelegator.new forwards protected method calls"
15+
16+
fails "Set#initialize is private"
17+
18+
fails "Singleton.allocate is a private method"
19+
fails "Singleton.new is a private method"
20+
end

0 commit comments

Comments
 (0)
Please sign in to comment.