spec/sparkle_spec.rb in motion-sparkle-0.0.5 vs spec/sparkle_spec.rb in motion-sparkle-0.0.6
- old
+ new
@@ -13,10 +13,11 @@
unless @completed_setup
teardown_temporary_directory
setup_temporary_directory
FileUtils.mkdir_p(temporary_directory + 'resources')
+ FileUtils.mkdir_p(temporary_directory + 'vendor')
FileUtils.touch(temporary_directory + '.gitignore')
@config = App.config
@config.project_dir = temporary_directory.to_s
@config.instance_eval do
@@ -31,10 +32,13 @@
release :notes_filename, 'example.html'
release :package_base_url, 'http://download.example.com'
release :package_filename, 'example.zip'
end
end
+ Rake::Task['sparkle:setup'].invoke
+ Rake::Task['sparkle:setup_certificates'].invoke
+ @completed_setup = true
end
end
it "Sparkle's release base url should be set correctly" do
@config.sparkle.appcast.base_url.should.equal 'http://example.com'
@@ -64,28 +68,18 @@
it "Version should be same for short_version and version" do
@config.version.should.equal @config.short_version
end
it "Sparkle framework should be embedded" do
- sparkle_framework_path = ROOT + "vendor/Sparkle.framework"
- @config.embedded_frameworks.include?(sparkle_framework_path.to_s).should.equal true
+ sparkle_framework_path = ROOT + "tmp/vendor/Sparkle.framework"
+ @config.embedded_frameworks.include?(sparkle_framework_path).should.equal true
end
- before do
- unless @completed_setup
- Rake::Task['sparkle:setup'].invoke
- Rake::Task['sparkle:setup_certificates'].invoke
- @completed_setup = true
- end
- end
-
it "should create private certificate" do
- puts @config.sparkle.private_key_path.to_s
File.exist?(@config.sparkle.private_key_path.to_s).should.equal true
end
it "should create public certificate" do
- puts @config.sparkle.public_key_path.to_s
File.exist?(@config.sparkle.public_key_path.to_s).should.equal true
end
it "should add files to gitignore" do
a = `cat .gitignore`