spec/lita/handlers/github_commits_spec.rb in lita-github-commits-0.1.0 vs spec/lita/handlers/github_commits_spec.rb in lita-github-commits-0.2.0

- old
+ new

@@ -27,12 +27,17 @@ end it "sends a notification message to the applicable rooms" do expect(robot).to receive(:send_message) do |target, message| expect(target.room).to eq("#baz") - expect(message).to eq( - "[GitHub] Got 3 new commits from Garen Torikian on octokitty/testing on the master branch") + expect(message).to eq(<<-RESPONSE.chomp +[GitHub] Got 3 new commits from Garen Torikian on octokitty/testing on the master branch + * Test + * This is me testing the windows client. + * Rename madame-bovary.txt to words/madame-bovary.txt + RESPONSE + ) end subject.receive(request, response) end end @@ -44,12 +49,15 @@ end it "sends a singular commit notification message to the applicable rooms" do expect(robot).to receive(:send_message) do |target, message| expect(target.room).to eq("#baz") - expect(message).to eq( - "[GitHub] Got 1 new commit from Garen Torikian on octokitty/testing on the master branch") + expect(message).to eq(<<-RESPONSE.chomp +[GitHub] Got 1 new commit from Garen Torikian on octokitty/testing on the master branch + * Test + RESPONSE + ) end subject.receive(request, response) end end @@ -59,12 +67,16 @@ allow(params).to receive(:[]).with("payload").and_return(valid_payload_diff_committer) end it "sends a notification message to the applicable rooms" do expect(robot).to receive(:send_message) do |target, message| - expect(message).to eq( - "[GitHub] Got 3 new commits authored by Garen Torikian and " + - "committed by Repository Owner on octokitty/testing on the master branch") + expect(message).to eq(<<-RESPONSE.chomp +[GitHub] Got 3 new commits authored by Garen Torikian and committed by Repository Owner on octokitty/testing on the master branch + * Test + * This is me testing the windows client. + * Rename madame-bovary.txt to words/madame-bovary.txt + RESPONSE + ) end subject.receive(request, response) end end