Fix specs.

This commit is contained in:
Douwe Maan 2015-02-20 16:05:40 +01:00
parent 19f04cf989
commit d86c0cda24
8 changed files with 12 additions and 14 deletions

View file

@ -93,4 +93,4 @@ end
require "slack_service/issue_message"
require "slack_service/push_message"
require "slack_service/merge_message"
require "slack_service/merge_message"

View file

@ -1,4 +1,4 @@
module SlackService
class SlackService
class IssueMessage < BaseMessage
attr_reader :username
attr_reader :title

View file

@ -1,4 +1,4 @@
module SlackService
class SlackService
class MergeMessage < BaseMessage
attr_reader :username
attr_reader :project_name

View file

@ -1,6 +1,4 @@
require 'slack-notifier'
module SlackService
class SlackService
class PushMessage < BaseMessage
attr_reader :after
attr_reader :before

View file

@ -1,7 +1,7 @@
require 'spec_helper'
describe SlackMessages::SlackIssueMessage do
subject { SlackMessages::SlackIssueMessage.new(args) }
describe SlackService::IssueMessage do
subject { SlackService::IssueMessage.new(args) }
let(:args) {
{

View file

@ -1,7 +1,7 @@
require 'spec_helper'
describe SlackMessages::SlackMergeMessage do
subject { SlackMessages::SlackMergeMessage.new(args) }
describe SlackService::MergeMessage do
subject { SlackService::MergeMessage.new(args) }
let(:args) {
{

View file

@ -1,7 +1,7 @@
require 'spec_helper'
describe SlackMessages::SlackPushMessage do
subject { SlackMessages::SlackPushMessage.new(args) }
describe SlackService::PushMessage do
subject { SlackService::PushMessage.new(args) }
let(:args) {
{
@ -31,8 +31,8 @@ describe SlackMessages::SlackPushMessage do
)
expect(subject.attachments).to eq([
{
text: "<url1|abcdefghi>: message1 - author1\n"\
"<url2|123456789>: message2 - author2",
text: "<url1|abcdefgh>: message1 - author1\n"\
"<url2|12345678>: message2 - author2",
color: color,
}
])