From 2cd470e7a305e400a3ce0d09c1b811f5f1b52740 Mon Sep 17 00:00:00 2001 From: kzgs Date: Sun, 4 Mar 2012 11:43:19 +0900 Subject: [PATCH] Add a spec of StoreTargetLink #30 --- spec/plugins/store/target_link_spec.rb | 30 ++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 spec/plugins/store/target_link_spec.rb diff --git a/spec/plugins/store/target_link_spec.rb b/spec/plugins/store/target_link_spec.rb new file mode 100644 index 0000000..61c0f8b --- /dev/null +++ b/spec/plugins/store/target_link_spec.rb @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# Name:: Automatic::Plugin::CustomFeed::SVNFLog +# Author:: kzgs +# Created:: Mar 4, 2012 +# Updated:: Mar 4, 2012 +# Copyright:: kzgs Copyright (c) 2012 +# License:: Licensed under the GNU GENERAL PUBLIC LICENSE, Version 3.0. + +require File.expand_path(File.dirname(__FILE__) + '../../../spec_helper') + +require 'store/target_link' + +require 'tmpdir' +require 'pathname' + +describe Automatic::Plugin::StoreTargetLink do + it "should store the target link" do + Dir.mktmpdir do |dir| + instance = Automatic::Plugin::StoreTargetLink.new( + { "path" => dir }, + AutomaticSpec.generate_pipeline { + feed { item "http://digithoughts.com/rss" } + }) + + instance.run.should have(1).feed + (Pathname(dir)+"rss").should be_exist + end + end +end +