spec/tmbundle/bundle_name_spec.rb in tmbundle-manager-0.1.1 vs spec/tmbundle/bundle_name_spec.rb in tmbundle-manager-0.1.2
- old
+ new
@@ -1,10 +1,16 @@
require 'spec_helper'
require 'tmbundle'
require 'tmbundle/bundle_name'
describe TMBundle::BundleName do
- subject(:name) { described_class.new('davidrios/jade-tmbundle') }
- its(:name) { should eq('davidrios/jade-tmbundle') }
- its(:install_name) { should eq('jade.tmbundle') }
- its(:git_url) { should eq('https://github.com/davidrios/jade-tmbundle.git') }
+ endings = ['-tmbundle', '.tmbundle', '']
+
+ endings.each do |ending|
+ context "ending in #{ending.inspect}" do
+ subject(:name) { described_class.new("davidrios/jade#{ending}") }
+ its(:name) { should eq("davidrios/jade#{ending}") }
+ its(:install_name) { should eq('jade.tmbundle') }
+ its(:git_url) { should eq("https://github.com/davidrios/jade#{ending.empty? ? '.tmbundle' : ending}.git") }
+ end
+ end
end