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 CHANGED
@@ -24,6 +24,11 @@ Get the gem:
24
24
  # Install the gem
25
25
  sudo gem install matthew-method_lister
26
26
 
27
+ Build the gem:
28
+
29
+ rake gem
30
+ sudo gem install pkg/*.gem
31
+
27
32
  Open up `~/.irbrc` and add these lines:
28
33
 
29
34
  require 'rubygems'
@@ -18,7 +18,7 @@ module MethodLister
18
18
  @methods[visibility]
19
19
  else
20
20
  raise ArgumentError, "Unknown visibility #{visibility.inspect}"
21
- end
21
+ end.sort
22
22
  end
23
23
 
24
24
  def has_methods?(visibility=:all)
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matthew-method_lister
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew O'Connor