spec/lita/rspec_spec.rb in lita-2.4.0 vs spec/lita/rspec_spec.rb in lita-2.5.0

- old
+ new

@@ -5,10 +5,12 @@ route(/^\w{4}$/, :blah, command: true) route("restricted", :restricted, restrict_to: :some_group) http.get "web", :web + on :connected, :greet + def foo(response) response.reply "baz" end def blah(response) @@ -19,10 +21,13 @@ end def web(request, response) end + def greet(payload) + end + def self.name "Lita::Handlers::Test" end end @@ -34,9 +39,12 @@ it { doesnt_route_command("yo").to(:foo) } it { does_not_route_command("yo").to(:foo) } it { routes("restricted").to(:restricted) } it { routes_http(:get, "web").to(:web) } it { doesnt_route_http(:post, "web").to(:web) } + it { routes_event(:connected).to(:greet) } + it { doesnt_route_event(:connected).to(:web) } + it { does_not_route_event(:connected).to(:web) } describe "#foo" do it "replies with baz" do send_message("foo") expect(replies).to eq(["baz"])