Sha256: 1e0026d7106aca4b8a1f3a5a0fb67b736a0b0dabb154de8d390ad71830855b3a

Contents?: true

Size: 855 Bytes

Versions: 42

Compression:

Stored size: 855 Bytes

Contents

require "spec_helper"
require_relative "../../../lib/octopolo/jira/story_commenter"

module Octopolo
  module Jira
    describe StoryCommenter do
      let(:comments) { stub }
      let(:issue) { stub(:comments => comments) }
      context ".new" do
        it "finds the issue via the jira api" do
          Jiralicious.should_receive(:configure)
          Jiralicious::Issue.should_receive(:find).with(:id).and_return(issue)
          StoryCommenter.new(:id, 'text')
        end
      end

      context "#perform" do
        let(:comment) { "test comment" }
        before do
          Jiralicious::Issue.stub(:find).with(:id).and_return(issue)
        end

        it "creates a new note for the story" do
          comments.should_receive(:add).with(comment)
          StoryCommenter.new(:id, comment).perform
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
octopolo-1.12.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.11.4 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.11.3 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.11.1 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.11.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.9.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.8.1 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.8.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.7.1 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.7.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.6.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.5.3 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.5.2 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.5.1 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.5.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.4.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.3.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.2.1 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.2.0 spec/octopolo/jira/stor_commenter_spec.rb
octopolo-1.1.1 spec/octopolo/jira/stor_commenter_spec.rb