Module: Lita::RSpec::Matchers::DeprecatedMethods
- Included in:
- Handler
- Defined in:
- lib/lita/rspec/matchers/deprecated.rb
Instance Method Summary collapse
-
#does_not_route(message) ⇒ Deprecated
(also: #doesnt_route)
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.not_to route instead.
-
#does_not_route_command(message) ⇒ Deprecated
(also: #doesnt_route_command)
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.not_to route_command instead.
-
#does_not_route_event(event_name) ⇒ Deprecated
(also: #doesnt_route_event)
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.not_to route_event instead.
-
#does_not_route_http(http_method, path) ⇒ Deprecated
(also: #doesnt_route_http)
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.not_to route_http instead.
-
#routes(message) ⇒ Deprecated
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.to route instead.
-
#routes_command(message) ⇒ Deprecated
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.to route_command instead.
-
#routes_event(event_name) ⇒ Deprecated
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.to route_event instead.
-
#routes_http(http_method, path) ⇒ Deprecated
deprecated
Deprecated.
Will be removed in Lita 5.0. Use is_expected.to route_http instead.
Instance Method Details
#does_not_route(message) ⇒ Deprecated Also known as: doesnt_route
Will be removed in Lita 5.0. Use is_expected.not_to route instead.
Starts a chat routing test chain, asserting that a message should not trigger a route.
26 27 28 29 30 31 32 33 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 26 def does_not_route() STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "does_not_route", new_method: "is_expected.not_to route", ) Deprecated.new(self, :route, false, ) end |
#does_not_route_command(message) ⇒ Deprecated Also known as: doesnt_route_command
Will be removed in Lita 5.0. Use is_expected.not_to route_command instead.
Starts a chat routing test chain, asserting that a “command” message should not trigger a route.
57 58 59 60 61 62 63 64 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 57 def does_not_route_command() STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "does_not_route_command", new_method: "is_expected.not_to route_command", ) Deprecated.new(self, :route_command, false, ) end |
#does_not_route_event(event_name) ⇒ Deprecated Also known as: doesnt_route_event
Will be removed in Lita 5.0. Use is_expected.not_to route_event instead.
Starts an event subscription test chain, asserting that an event should not trigger the target method.
127 128 129 130 131 132 133 134 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 127 def does_not_route_event(event_name) STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "does_not_route_event", new_method: "is_expected.not_to route_event", ) Deprecated.new(self, :route_event, false, event_name) end |
#does_not_route_http(http_method, path) ⇒ Deprecated Also known as: doesnt_route_http
Will be removed in Lita 5.0. Use is_expected.not_to route_http instead.
Starts an HTTP routing test chain, asserting that a request to the given path with the given HTTP request method will not trigger a route.
94 95 96 97 98 99 100 101 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 94 def does_not_route_http(http_method, path) STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "does_not_route_http", new_method: "is_expected.not_to route_http", ) Deprecated.new(self, :route_http, false, http_method, path) end |
#routes(message) ⇒ Deprecated
Will be removed in Lita 5.0. Use is_expected.to route instead.
Starts a chat routing test chain, asserting that a message should trigger a route.
11 12 13 14 15 16 17 18 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 11 def routes() STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "routes", new_method: "is_expected.to route", ) Deprecated.new(self, :route, true, ) end |
#routes_command(message) ⇒ Deprecated
Will be removed in Lita 5.0. Use is_expected.to route_command instead.
Starts a chat routing test chain, asserting that a “command” message should trigger a route.
42 43 44 45 46 47 48 49 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 42 def routes_command() STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "routes_command", new_method: "is_expected.to route_command", ) Deprecated.new(self, :route_command, true, ) end |
#routes_event(event_name) ⇒ Deprecated
Will be removed in Lita 5.0. Use is_expected.to route_event instead.
Starts an event subscription test chain, asserting that an event should trigger the target method.
111 112 113 114 115 116 117 118 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 111 def routes_event(event_name) STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "routes_event", new_method: "is_expected.to route_event", ) Deprecated.new(self, :route_event, true, event_name) end |
#routes_http(http_method, path) ⇒ Deprecated
Will be removed in Lita 5.0. Use is_expected.to route_http instead.
Starts an HTTP routing test chain, asserting that a request to the given path with the given HTTP request method will trigger a route.
76 77 78 79 80 81 82 83 |
# File 'lib/lita/rspec/matchers/deprecated.rb', line 76 def routes_http(http_method, path) STDERR.puts I18n.t( "lita.rspec.matcher_deprecated", old_method: "routes_http", new_method: "is_expected.to route_http", ) Deprecated.new(self, :route_http, true, http_method, path) end |