matthew-method_lister 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.markdown +5 -0
- data/lib/method_lister/find_result.rb +1 -1
- data/spec/find_result_spec.rb +10 -10
- metadata +1 -1
data/README.markdown
CHANGED
data/spec/find_result_spec.rb
CHANGED
|
@@ -37,34 +37,34 @@ describe MethodLister::FindResult do
|
|
|
37
37
|
describe "#methods" do
|
|
38
38
|
it "knows all its methods" do
|
|
39
39
|
@empty_result.methods(:all).should be_empty
|
|
40
|
-
@only_public.methods(:all).should == @public
|
|
41
|
-
@only_protected.methods(:all).should == @protected
|
|
42
|
-
@only_private.methods(:all).should == @private
|
|
43
|
-
@mixed_result.methods(:all).should == @all
|
|
40
|
+
@only_public.methods(:all).should == @public.sort
|
|
41
|
+
@only_protected.methods(:all).should == @protected.sort
|
|
42
|
+
@only_private.methods(:all).should == @private.sort
|
|
43
|
+
@mixed_result.methods(:all).should == @all.sort
|
|
44
44
|
end
|
|
45
45
|
|
|
46
46
|
it "knows its public methods" do
|
|
47
47
|
@empty_result.methods(:public).should be_empty
|
|
48
|
-
@only_public.methods(:public).should == @public
|
|
48
|
+
@only_public.methods(:public).should == @public.sort
|
|
49
49
|
@only_protected.methods(:public).should be_empty
|
|
50
50
|
@only_private.methods(:public).should be_empty
|
|
51
|
-
@mixed_result.methods(:public).should == @public
|
|
51
|
+
@mixed_result.methods(:public).should == @public.sort
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
it "knows its protected methods" do
|
|
55
55
|
@empty_result.methods(:protected).should be_empty
|
|
56
56
|
@only_public.methods(:protected).should be_empty
|
|
57
|
-
@only_protected.methods(:protected).should == @protected
|
|
57
|
+
@only_protected.methods(:protected).should == @protected.sort
|
|
58
58
|
@only_private.methods(:protected).should be_empty
|
|
59
|
-
@mixed_result.methods(:protected).should == @protected
|
|
59
|
+
@mixed_result.methods(:protected).should == @protected.sort
|
|
60
60
|
end
|
|
61
61
|
|
|
62
62
|
it "knows its private methods" do
|
|
63
63
|
@empty_result.methods(:private).should be_empty
|
|
64
64
|
@only_public.methods(:private).should be_empty
|
|
65
65
|
@only_protected.methods(:private).should be_empty
|
|
66
|
-
@only_private.methods(:private).should == @private
|
|
67
|
-
@mixed_result.methods(:private).should == @private
|
|
66
|
+
@only_private.methods(:private).should == @private.sort
|
|
67
|
+
@mixed_result.methods(:private).should == @private.sort
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
it "raises an exception if given an unknown visibility" do
|