Skip to content

Commit

Permalink
[Spec#lint] Fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiopelosin committed Jul 3, 2012
1 parent 1fd90d2 commit 81c1043
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cocoapods/command/spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def lint
else
raise Informative, count == 1 ? "The spec did not pass validation." : "#{invalid_count} out of #{count} specs failed validation."
end
podspecs_tmp_dir.rmtree if tmp_dir.exist?
podspecs_tmp_dir.rmtree if podspecs_tmp_dir.exist?
end

private
Expand Down
12 changes: 10 additions & 2 deletions spec/functional/command/spec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,16 @@

it "lints the current working directory" do
Dir.chdir(fixture('spec-repos') + 'master/JSONKit/1.4/') do
output = command('spec', 'lint', '--quick', '--only-errors').run
output.should.include "passed validation"
cmd = command('spec', 'lint', '--quick', '--only-errors')
cmd.run
cmd.output.should.include "passed validation"
end
end

it "lints a remote podspec" do
Dir.chdir(fixture('spec-repos') + 'master/JSONKit/1.4/') do
cmd = command('spec', 'lint', '--quick', '--only-errors', '--silent', 'https://github.com/CocoaPods/Specs/raw/master/A2DynamicDelegate/2.0.1/A2DynamicDelegate.podspec')
VCR.use_cassette('linter', :record => :new_episodes) { lambda { cmd.run }.should.not.raise }
end
end

Expand Down

0 comments on commit 81c1043

Please sign in to comment.