Commit 502432ab authored by Fabio Pelosin's avatar Fabio Pelosin

[fixed] specs

parent 915bcd8e
---
JSGCDDispatcher:
:creation_date: 2011-09-27 04:50:32 +02:00
PINView:
:creation_date: 2011-12-30 15:44:26 +01:00
TBXML:
:creation_date: 2011-12-18 15:06:29 +01:00
SFHFKeychainUtils:
:creation_date: 2011-11-20 00:33:47 +01:00
Specta:
:creation_date: 2012-01-09 10:44:32 +01:00
TouchJSON:
:creation_date: 2011-12-08 16:01:01 +01:00
FileMD5Hash:
:creation_date: 2012-01-30 15:11:42 +01:00
LibComponentLogging-NSLog:
:creation_date: 2011-10-02 22:48:25 +02:00
NSLogger-CocoaLumberjack-connector:
:creation_date: 2011-11-15 19:05:42 +01:00
LRResty:
:creation_date: 2011-09-21 01:45:03 +02:00
A2DynamicDelegate:
:creation_date: 2011-12-18 13:52:48 +01:00
CocoaAsyncSocket:
:creation_date: 2011-11-22 11:53:58 +01:00
MBProgressHUD:
:creation_date: 2012-01-27 12:41:28 +01:00
SDWebImage:
:creation_date: 2011-11-15 23:11:49 +01:00
A2StoryboardSegueContext:
:creation_date: 2011-12-23 05:40:29 +01:00
MKNetworkKit:
:creation_date: 2011-12-14 18:21:33 +01:00
TTTAttributedLabel:
:creation_date: 2011-09-18 22:31:14 +02:00
libPusher:
:creation_date: 2012-02-01 17:05:58 +01:00
INAppStoreWindow:
:creation_date: 2011-11-16 20:21:35 +01:00
MTLocation:
:creation_date: 2011-11-10 20:28:01 +01:00
LRMocky:
:creation_date: 2011-09-21 02:34:18 +02:00
ConciseKit:
:creation_date: 2012-01-09 00:32:07 +01:00
KKGridView:
:creation_date: 2011-11-21 12:27:34 +01:00
MagicalRecord:
:creation_date: 2011-11-22 23:51:22 +01:00
IMAPClient:
:creation_date: 2012-01-01 22:09:28 +01:00
HockeySDK:
:creation_date: 2011-12-29 11:50:23 +01:00
MGSplitViewController:
:creation_date: 2011-09-20 23:01:04 +02:00
INKeychainAccess:
:creation_date: 2011-11-26 23:44:48 +01:00
Expecta:
:creation_date: 2012-01-09 00:32:07 +01:00
iCarousel:
:creation_date: 2012-02-03 11:48:41 +01:00
SSKeychain:
:creation_date: 2011-09-18 17:23:10 +02:00
NLCoreData:
:creation_date: 2012-01-25 10:14:35 +01:00
ASIHTTPRequest:
:creation_date: 2011-09-08 21:46:11 +02:00
ZBarSDK:
:creation_date: 2011-11-19 23:12:38 +01:00
ASIWebPageRequest:
:creation_date: 2011-09-08 21:46:11 +02:00
SBJson:
:creation_date: 2011-09-23 19:41:42 +02:00
QuickDialog:
:creation_date: 2011-11-22 21:59:44 +01:00
AFNetworking:
:creation_date: 2011-09-18 21:02:31 +02:00
JSONKit:
:creation_date: 2011-09-12 10:49:04 +02:00
iRate:
:creation_date: 2012-01-29 22:19:19 +01:00
SSToolkit:
:creation_date: 2011-10-20 23:00:07 +02:00
BlocksKit:
:creation_date: 2011-11-01 11:29:58 +01:00
SSCheckBoxView:
:creation_date: 2012-01-31 18:11:35 +01:00
HockeyKit:
:creation_date: 2011-11-21 16:02:33 +01:00
FormatterKit:
:creation_date: 2011-09-18 22:31:14 +02:00
MTZoomWindow:
:creation_date: 2011-11-10 20:06:44 +01:00
RestKit:
:creation_date: 2011-10-02 22:48:25 +02:00
cocoa-oauth:
:creation_date: 2012-01-30 15:11:42 +01:00
Facebook-iOS-SDK:
:creation_date: 2011-12-15 20:09:29 +01:00
Appirater:
:creation_date: 2011-11-20 00:16:39 +01:00
EGOCache:
:creation_date: 2012-01-04 11:03:53 +01:00
OCHamcrest:
:creation_date: 2012-01-10 16:01:28 +01:00
OCMock:
:creation_date: 2011-11-27 01:53:12 +01:00
FMDB:
:creation_date: 2011-09-25 02:44:00 +02:00
Kiwi:
:creation_date: 2011-09-19 19:55:46 +02:00
PullToRefresh:
:creation_date: 2011-11-20 00:21:00 +01:00
Nimbus:
:creation_date: 2011-11-23 23:15:47 +01:00
Objection:
:creation_date: 2011-09-19 19:14:56 +02:00
NSLogger:
:creation_date: 2011-11-15 17:37:36 +01:00
MTStatusBarOverlay:
:creation_date: 2011-11-10 21:00:26 +01:00
SVProgressHUD:
:creation_date: 2011-11-15 21:55:28 +01:00
EGOTableViewPullRefresh:
:creation_date: 2011-11-13 18:08:37 +01:00
SOCKit:
:creation_date: 2012-01-30 15:11:42 +01:00
KKPasscodeLock:
:creation_date: 2012-01-30 15:55:19 +01:00
PSStackedView:
:creation_date: 2011-11-13 11:03:12 +01:00
QuincyKit:
:creation_date: 2011-11-21 23:42:35 +01:00
DCTTextFieldValidator:
:creation_date: 2011-11-16 00:55:06 +01:00
RegexKitLite:
:creation_date: 2011-12-13 13:46:45 +01:00
TouchXML:
:creation_date: 2011-12-07 16:55:17 +01:00
Reachability:
:creation_date: 2011-09-08 21:46:11 +02:00
SDURLCache:
:creation_date: 2011-09-25 21:14:43 +02:00
LibComponentLogging-Core:
:creation_date: 2011-10-02 22:48:25 +02:00
ATMHud:
:creation_date: 2011-11-19 23:53:38 +01:00
CocoaLumberjack:
:creation_date: 2011-10-06 17:37:56 +02:00
SSZipArchive:
:creation_date: 2011-09-11 15:45:34 +02:00
......@@ -13,35 +13,38 @@ describe "Pod::Command::List" do
def command(arguments = argv)
command = Pod::Command::List.new(arguments)
def command.puts(msg = '')
(@printed ||= '') << "#{msg}\n"
end
command
end
it "it accepts corret inputs and runs without errors" do
lambda { command().run }.should.not.raise
lambda { command(argv('10')).run }.should.not.raise
it "runs with correct parameters" do
lambda { command.run }.should.not.raise
lambda { command(argv('new')).run }.should.not.raise
end
it "complains if the days parameter is not a number" do
lambda { command(argv('10a')).run }.should.raise Pod::Command::Help
it "complains for wrong parameters" do
lambda { command(argv('wrong')).run }.should.raise Pod::Command::Help
lambda { command(argv('--wrong')).run }.should.raise Pod::Command::Help
end
it "returns the specs know in a given commit" do
specs = command(argv('10')).spec_names_from_commit('cad98852103394951850f89f0efde08f9dc41830')
specs[00].should == 'A2DynamicDelegate'
specs[10].should == 'DCTTextFieldValidator'
specs[20].should == 'INKeychainAccess'
specs[30].should == 'MKNetworkKit'
it "presents the known pods" do
list = command()
list.run
output = list.output
output.should.include 'ZBarSDK'
output.should.include 'TouchJSON'
output.should.include 'SDURLCache'
output.should.include 'MagicalRecord'
output.should.include 'A2DynamicDelegate'
output.should.include '75 pods were found'
end
it "returns the new specs introduced after a given commit" do
new_specs = command(argv('10')).new_specs_set('1c138d254bd39a3ccbe95a720098e2aaad5c5fc1')
new_specs_name = new_specs.map { |spec| spec.name }
new_specs_name.should.include 'iCarousel'
new_specs_name.should.include 'libPusher'
it "returns the new pods" do
Time.stubs(:now).returns(Time.mktime(2012,2,1))
list = command(argv('new'))
list.run
output = list.output
output.should.include 'iCarousel'
output.should.include 'cocoa-oauth'
output.should.include 'NLCoreData'
end
end
......
require File.expand_path('../../../spec_helper', __FILE__)
require 'net/http'
describe Pod::Command::SetPresent do
describe Pod::Command::Presenter do
Presenter = Pod::Command::Presenter
before do
@set = Pod::Spec::Set.new(fixture('spec-repos/master/CocoaLumberjack'))
@dummy = Object.new
@dummy.extend(Pod::Command::SetPresent)
def @dummy.puts(msg = '') (@printed ||= '') << "#{msg}\n" end
def @dummy.prinded() @printed.chomp end
end
it "repects the `--name-only' option" do
@dummy.parse_set_options(argv('--name-only'))
@dummy.present_set(@set)
@dummy.prinded.should == 'CocoaLumberjack'
Pod::Specification::Statistics.instance.cache_file = nil
end
it "presents the name, version, description, homepage and source of a specification set" do
@dummy.parse_set_options(argv())
@dummy.present_set(@set)
@dummy.prinded.should.include? 'CocoaLumberjack'
@dummy.prinded.should.include? '1.0'
@dummy.prinded.should.include? '1.1'
@dummy.prinded.should.include? 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.'
@dummy.prinded.should.include? 'https://github.com/robbiehanson/CocoaLumberjack'
@dummy.prinded.should.include? 'https://github.com/robbiehanson/CocoaLumberjack.git'
presenter = Presenter.new(argv())
output = presenter.render_set(@set)
output.should.include? 'CocoaLumberjack'
output.should.include? '1.0'
output.should.include? '1.1'
output.should.include? 'A fast & simple, yet powerful & flexible logging framework for Mac and iOS.'
output.should.include? 'https://github.com/robbiehanson/CocoaLumberjack'
output.should.include? 'https://github.com/robbiehanson/CocoaLumberjack.git'
end
it "presents the stats of a specification set" do
response = '{"repository":{"homepage":"","url":"https://github.com/robbiehanson/CocoaLumberjack","has_downloads":true,"has_issues":true,"language":"Objective-C","master_branch":"master","forks":42,"fork":false,"created_at":"2011/03/30 19:38:39 -0700","has_wiki":true,"description":"A fast & simple, yet powerful & flexible logging framework for Mac and iOS","size":416,"private":false,"name":"CocoaLumberjack","owner":"robbiehanson","open_issues":4,"watchers":318,"pushed_at":"2012/03/26 12:39:36 -0700"}}% '
Net::HTTP.expects(:get).with('github.com', '/api/v2/json/repos/show/robbiehanson/CocoaLumberjack').returns(response)
@dummy.parse_set_options(argv('--stats'))
@dummy.present_set(@set)
@dummy.prinded.should.match(/Watchers:\W+[0-9]+/)
@dummy.prinded.should.match(/Forks:\W+[0-9]+/)
presenter = Presenter.new(argv('--stats'))
output = presenter.render_set(@set)
output.should.include? 'License: BSD'
output.should.include? 'Platform: iOS - OS X'
output.should.include? 'Watchers: 318'
output.should.include? 'Forks: 318'
end
end
......
require File.expand_path('../../../spec_helper', __FILE__)
describe "Pod::Command::Search" do
extend SpecHelper::Git
before do
config.repos_dir = fixture('spec-repos')
end
after do
config.repos_dir = tmp_repos_path
end
def command(arguments = argv)
command = Pod::Command::Search.new(arguments)
end
it "runs with correct parameters" do
lambda { command(argv('table')).run }.should.not.raise
lambda { command(argv('table','--full')).run }.should.not.raise
end
it "complains for wrong parameters" do
lambda { command(argv('too','many')).run }.should.raise Pod::Command::Help
lambda { command(argv('too','--wrong')).run }.should.raise Pod::Command::Help
lambda { command(argv('--missing_query')).run }.should.raise Pod::Command::Help
end
it "presents the search results" do
search = command(argv('table'))
search.run
output = search.output
output.should.include 'EGOTableViewPullRefresh'
end
end
......@@ -66,3 +66,11 @@ VCR.configure do |c|
c.hook_into :webmock # or :fakeweb
c.allow_http_connections_when_no_cassette = true
end
class Pod::Command
attr_accessor :output
def puts(msg = '') (@output ||= '') << "#{msg}\n" end
end
Pod::Specification::Statistics.instance.cache_file = nil
......@@ -17,8 +17,10 @@ describe "Pod::Platform" do
@platform.should == :ios
end
it "uses it's name as it's string version" do
@platform.to_s.should == "ios"
it "presents an accurate string representation" do
@platform.to_s.should == "iOS"
Pod::Platform.new(:osx).to_s.should == 'OS X'
Pod::Platform.new(nil).to_s.should == "iOS - OS X"
end
it "uses it's name as it's symbold version" do
......
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