spec/kpm/remote/installer_spec.rb in kpm-0.2.3 vs spec/kpm/remote/installer_spec.rb in kpm-0.2.4
- old
+ new
@@ -6,10 +6,40 @@
before(:all) do
@logger = Logger.new(STDOUT)
@logger.level = Logger::INFO
end
+ it 'should be able to install only Kill Bill' do
+ Dir.mktmpdir do |dir|
+ kb_webapp_path = dir + '/KB_ROOT.war'
+ installer = KPM::Installer.new({
+ 'killbill' => {
+ 'webapp_path' => kb_webapp_path
+ }
+ },
+ @logger)
+
+ # No exception
+ installer.install.should be_nil
+ end
+ end
+
+ it 'should be able to install only Kaui' do
+ Dir.mktmpdir do |dir|
+ kaui_webapp_path = dir + '/KAUI_ROOT.war'
+ installer = KPM::Installer.new({
+ 'kaui' => {
+ 'webapp_path' => kaui_webapp_path
+ }
+ },
+ @logger)
+
+ # No exception
+ installer.install.should be_nil
+ end
+ end
+
it 'should be able to install all artifacts' do
Dir.mktmpdir do |dir|
kb_webapp_path = dir + '/KB_ROOT.war'
kaui_webapp_path = dir + '/KAUI_ROOT.war'
plugins_dir = dir + '/bundles'
@@ -34,11 +64,10 @@
}
},
'kaui' => {
'webapp_path' => kaui_webapp_path
}
-
},
@logger)
installer.install
check_installation(plugins_dir, kb_webapp_path, kaui_webapp_path)
@@ -52,18 +81,16 @@
info[:bundle_dir].should == plugins_dir + '/plugins/ruby/killbill-payment-test/1.8.7'
info = installer.install_plugin('analytics', nil, nil, nil, nil, nil, '0.7.1', plugins_dir)
info[:bundle_dir].should == plugins_dir + '/plugins/java/analytics-plugin/0.7.1'
-
end
end
private
def check_installation(plugins_dir, kb_webapp_path, kaui_webapp_path)
-
[
plugins_dir,
plugins_dir + '/platform',
plugins_dir + '/plugins',
plugins_dir + '/plugins/java',
@@ -112,8 +139,7 @@
plugin_identifiers['stripe']['group_id'].should == 'org.kill-bill.billing.plugin.ruby'
plugin_identifiers['stripe']['artifact_id'].should == 'stripe-plugin'
plugin_identifiers['stripe']['packaging'].should == 'tar.gz'
plugin_identifiers['stripe']['version'].should == '2.0.0'
plugin_identifiers['stripe']['language'].should == 'ruby'
-
end
end