@@ -22,11 +22,11 @@ def setup
22
22
@plugin . match ( /pattern/ )
23
23
matcher = @plugin . matchers . last
24
24
25
- assert_equal ( 1 , @plugin . matchers . size , "Shoult not forget existing matchers" )
26
- assert_equal Cinch ::Plugin ::ClassMethods ::Matcher . new ( /pattern/ , true , true , :execute ) , matcher
25
+ assert_equal ( 1 , @plugin . matchers . size , "Should not forget existing matchers" )
26
+ assert_equal Cinch ::Plugin ::ClassMethods ::Matcher . new ( /pattern/ , true , true , :execute , nil , nil , nil , nil , false ) , matcher
27
27
28
28
matcher = @plugin . match ( /pattern/ , use_prefix : false , use_suffix : false , method : :some_method )
29
- assert_equal Cinch ::Plugin ::ClassMethods ::Matcher . new ( /pattern/ , false , false , :some_method ) , matcher
29
+ assert_equal Cinch ::Plugin ::ClassMethods ::Matcher . new ( /pattern/ , false , false , :some_method , nil , nil , nil , nil , false ) , matcher
30
30
end
31
31
32
32
test "should be able to listen to events" do
@@ -108,55 +108,55 @@ def setup
108
108
@plugin . set :prefix , "some prefix"
109
109
@plugin . set :suffix , "some suffix"
110
110
@plugin . set :plugin_name , "some plugin"
111
- @plugin . set :reacting_on , :event1
111
+ @plugin . set :react_on , :event1
112
112
113
113
assert_equal "some help message" , @plugin . help
114
114
assert_equal "some prefix" , @plugin . prefix
115
115
assert_equal "some suffix" , @plugin . suffix
116
116
assert_equal "some plugin" , @plugin . plugin_name
117
- assert_equal :event1 , @plugin . reacting_on
117
+ assert_equal :event1 , @plugin . react_on
118
118
end
119
119
120
120
test "should support `set(key => value, key => value, ...)`" do
121
121
@plugin . set ( :help => "some help message" ,
122
122
:prefix => "some prefix" ,
123
123
:suffix => "some suffix" ,
124
124
:plugin_name => "some plugin" ,
125
- :reacting_on => :event1 )
125
+ :react_on => :event1 )
126
126
127
127
assert_equal "some help message" , @plugin . help
128
128
assert_equal "some prefix" , @plugin . prefix
129
129
assert_equal "some suffix" , @plugin . suffix
130
130
assert_equal "some plugin" , @plugin . plugin_name
131
- assert_equal :event1 , @plugin . reacting_on
131
+ assert_equal :event1 , @plugin . react_on
132
132
end
133
133
134
134
test "should support `self.key = value`" do
135
135
@plugin . help = "some help message"
136
136
@plugin . prefix = "some prefix"
137
137
@plugin . suffix = "some suffix"
138
138
@plugin . plugin_name = "some plugin"
139
- @plugin . reacting_on = :event1
139
+ @plugin . react_on = :event1
140
140
141
141
assert_equal "some help message" , @plugin . help
142
142
assert_equal "some prefix" , @plugin . prefix
143
143
assert_equal "some suffix" , @plugin . suffix
144
144
assert_equal "some plugin" , @plugin . plugin_name
145
- assert_equal :event1 , @plugin . reacting_on
145
+ assert_equal :event1 , @plugin . react_on
146
146
end
147
147
148
148
test "should support querying attributes" do
149
149
@plugin . plugin_name = "foo"
150
150
@plugin . help = "I am a help message"
151
151
@plugin . prefix = "^"
152
152
@plugin . suffix = "!"
153
- @plugin . react_on ( :event1 )
153
+ @plugin . react_on = :event1
154
154
155
155
assert_equal "foo" , @plugin . plugin_name
156
156
assert_equal "I am a help message" , @plugin . help
157
157
assert_equal "^" , @plugin . prefix
158
158
assert_equal "!" , @plugin . suffix
159
- assert_equal :event1 , @plugin . reacting_on
159
+ assert_equal :event1 , @plugin . react_on
160
160
end
161
161
162
162
test "should have a default name" do
0 commit comments