Commit fe461952 authored by Fabio Pelosin's avatar Fabio Pelosin

[Specs] Minor clean up and cosmetic fixes.

parent 9323fbac
require File.expand_path('../../../spec_helper', __FILE__)
describe "Pod::Command::Install" do
extend SpecHelper::Command
extend SpecHelper::TemporaryDirectory
extend SpecHelper::TemporaryRepos
it "should include instructions on how to reference the xcode project" do
Pod::Command::Install.banner.should.match %r{xcodeproj 'path/to/XcodeProject'}
end
end
it "tells the user that no Podfile or podspec was found in the current working dir" do
exception = lambda { run_command('install','--no-update') }.should.raise Pod::Informative
exception.message.should.include "No `Podfile' found in the current working directory."
end
end
......@@ -69,7 +69,7 @@ else
target = target_definition
with_xcodebuild_available do
Dir.chdir(config.project_pods_root) do
puts "\n[!] Compiling #{target.label} static library..."
print "[!] Compiling #{target.label}...\r"
should_successfully_perform "xcodebuild -target '#{target.label}'"
lib_path = config.project_pods_root + "build/Release#{'-iphoneos' if target.platform == :ios}" + target.lib_name
`lipo -info '#{lib_path}'`.should.include "architecture: #{target.platform == :ios ? 'armv7' : 'x86_64'}"
......@@ -117,7 +117,7 @@ else
}
end
it "install a dummy source file" do
it "installs a dummy source file" do
create_config!
podfile = Pod::Podfile.new do
self.platform :ios
......
......@@ -15,12 +15,3 @@ describe "Pod::Command::Repo" do
end
end
describe "Pod::Command::Install" do
it "tells the user that no Podfile or podspec was found in the current working dir" do
command = Pod::Command::Install.new(argv)
exception = lambda {
command.run
}.should.raise Pod::Informative
exception.message.should.include "No `Podfile' found in the current working directory."
end
end
......@@ -2,18 +2,15 @@ require File.expand_path('../../spec_helper', __FILE__)
describe "Pod::Installer" do
before do
@config_before = config
Pod::Config.instance = nil
config.silent = true
config.repos_dir = fixture('spec-repos')
config.project_pods_root = fixture('integration')
end
after do
Pod::Config.instance = @config_before
config.repos_dir = SpecHelper.tmp_repos_path
end
describe ", by default," do
describe "by default" do
before do
podfile = Pod::Podfile.new do
platform :ios
......
require File.expand_path('../../spec_helper', __FILE__)
describe Pod::Platform do
describe "by default" do
it "returns a new Platform instance" do
Pod::Platform.ios.should == Pod::Platform.new(:ios)
Pod::Platform.osx.should == Pod::Platform.new(:osx)
......@@ -56,9 +57,9 @@ describe Pod::Platform do
p.deployment_target = Pod::Version.new('4.0.0')
p.deployment_target.should == Pod::Version.new('4.0.0')
end
end
end
describe "Pod::Platform with a nil value" do
describe "with a nil value" do
before do
@platform = Pod::Platform.new(nil)
end
......@@ -66,10 +67,10 @@ describe "Pod::Platform with a nil value" do
it "behaves like a nil object" do
@platform.should.be.nil
end
end
end
describe "Pod::Platform#supports?" do
it "supports another platform is with the same operating system" do
describe "regarding supporting platforms" do
it "supports platforms with the same operating system" do
p1 = Pod::Platform.new(:ios)
p2 = Pod::Platform.new(:ios)
p1.should.supports?(p2)
......@@ -104,4 +105,5 @@ describe "Pod::Platform#supports?" do
p2 = Pod::Platform.new(:osx)
p1.should.not.supports?(p2)
end
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment