Commit f2c15270 authored by Olivier Halligon's avatar Olivier Halligon

Renamed the evil podspec

parent 275175be
Pod::Spec.new do |s|
s.name = 'Foo+Bar'
s.name = 'Pod+With+Plus+Signs'
s.version = '1.0'
s.authors = 'FooBar Corp'
s.homepage = 'http://foobar-corp.local/foobar.html'
s.summary = 'Wohoo foobars!'
s.description = 'Silly foos, silly bars.'
s.authors = 'Evil Corp'
s.homepage = 'http://evil-corp.local/pod_with_plus_signs.html'
s.summary = 'Messing with special chars'
s.description = 'I love messing up with special chars in my pod name! Mouahahahahaa (evil laugh)'
s.platform = :ios
s.source = { :git => 'http://foobar-corp.local/foobar.git', :tag => '1.0' }
s.source = { :git => 'http://evil-corp.local/pod_with_plus_signs.git', :tag => '1.0' }
s.source_files = 'Classes/*.{h,m}'
s.license = {
:type => 'MIT',
......
......@@ -23,13 +23,13 @@ module Pod
dates = {
'BananaLib' => Time.now,
'JSONKit' => Time.parse('01/01/1970'),
'Foo+Bar' => Time.parse('01/01/1970'),
'Pod+With+Plus+Signs' => Time.parse('01/01/1970'),
}
Specification::Set::Statistics.any_instance.stubs(:creation_dates).returns(dates)
out = run_command('list', 'new')
out.should.include('BananaLib')
out.should.not.include('JSONKit')
out.should.not.include('Foo+Bar')
out.should.not.include('Pod+With+Plus+Signs')
end
it 'presents the known pods with versions' do
......
......@@ -54,14 +54,20 @@ module Pod
lambda { run_command('search', '--regex', '+') }.should.raise CLAide::Help
end
it 'uses regex when asked for regex mode' do
it 'does not try to validate the query as a regex with plain-text search' do
lambda { run_command('search', '+') }.should.not.raise CLAide::Help
end
it 'uses regex search when asked for regex mode' do
output = run_command('search', '--regex', 'Ba(na)+Lib')
output.should.include? 'BananaLib'
output.should.not.include? 'Pod+With+Plus+Signs'
output.should.not.include? 'JSONKit'
end
it 'uses plain-text search when not asked for regex mode' do
output = run_command('search', 'Foo+Bar')
output.should.include? 'Foo+Bar'
output = run_command('search', 'Pod+With+Plus+Signs')
output.should.include? 'Pod+With+Plus+Signs'
output.should.not.include? 'BananaLib'
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