forked from id774/automaticruby
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheject_spec.rb
More file actions
40 lines (32 loc) · 1.02 KB
/
eject_spec.rb
File metadata and controls
40 lines (32 loc) · 1.02 KB
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
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
# Name:: Automatic::Plugin::Publish::Eject
# Author:: soramugi <http://soramugi.net>
# Created:: Jun 9, 2013
# Updated:: Jun 9, 2013
# Copyright:: Copyright (c) 2012-2013 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/eject'
describe Automatic::Plugin::PublishEject do
before do
@pipeline = AutomaticSpec.generate_pipeline {
feed { item "http://github.com" }}
end
subject {
Automatic::Plugin::PublishEject.new({}, @pipeline)
}
it "should eject of feeds" do
subject.stub(:eject_cmd).and_return('echo')
subject.run.should have(1).items
end
subject {
Automatic::Plugin::PublishEject.new({'interval' => 0}, @pipeline)
}
it "should eject of feeds" do
subject.stub(:eject_cmd).and_return('echo')
subject.run.should have(1).items
end
it "should eject_cmd" do
subject.eject_cmd.should_not == ''
end
end