forked from id774/automaticruby
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathconsole_spec.rb
More file actions
30 lines (25 loc) · 883 Bytes
/
console_spec.rb
File metadata and controls
30 lines (25 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::Console
# Author:: 774 <http://id774.net>
# Updated:: Feb 25, 2014
# Copyright:: Copyright (c) 2012-2014 Automatic Ruby Developers.
# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0.
require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper')
require 'publish/console'
describe Automatic::Plugin::PublishConsole do
before do
@pipeline = AutomaticSpec.generate_pipeline {
feed { item "http://github.com" }
}
end
subject {
Automatic::Plugin::PublishConsole.new({}, @pipeline)
}
it "should output pretty inspect of feeds" do
output = double("output")
output.should_receive(:puts).
with("info", @pipeline[0].items[0].pretty_inspect)
subject.instance_variable_set(:@output, output)
subject.run.should have(1).items
end
end