Commit a917e967 authored by Fabio Pelosin's avatar Fabio Pelosin

[Specs] Fix failures related to change of files case.

parent aa36ea80
...@@ -100,7 +100,7 @@ module Pod ...@@ -100,7 +100,7 @@ module Pod
installer = Installer.new(config.sandbox, podfile) installer = Installer.new(config.sandbox, podfile)
installer.install! installer.install!
dummy = (config.project_pods_root + 'Pods-Dummy.m').read dummy = (config.project_pods_root + 'Pods-dummy.m').read
dummy.should.include?('@implementation PodsDummy_Pods') dummy.should.include?('@implementation PodsDummy_Pods')
end end
...@@ -119,7 +119,7 @@ module Pod ...@@ -119,7 +119,7 @@ module Pod
installer = Installer.new(config.sandbox, podfile) installer = Installer.new(config.sandbox, podfile)
installer.install! installer.install!
dummy = (config.project_pods_root + 'Pods-AnotherTarget-Dummy.m').read dummy = (config.project_pods_root + 'Pods-AnotherTarget-dummy.m').read
dummy.should.include?('@implementation PodsDummy_Pods_AnotherTarget') dummy.should.include?('@implementation PodsDummy_Pods_AnotherTarget')
end end
......
...@@ -29,9 +29,9 @@ describe Pod::Generator::Markdown do ...@@ -29,9 +29,9 @@ describe Pod::Generator::Markdown do
end end
it "writes a markdown file to disk" do it "writes a markdown file to disk" do
basepath = @sandbox.root + "Pods-Acknowledgements" basepath = @sandbox.root + "Pods-acknowledgements"
given_path = @markdown.class.path_from_basepath(basepath) given_path = @markdown.class.path_from_basepath(basepath)
expected_path = @sandbox.root + "Pods-Acknowledgements.markdown" expected_path = @sandbox.root + "Pods-acknowledgements.markdown"
mockFile = mock mockFile = mock
mockFile.expects(:write).with(equals(@markdown.licenses)) mockFile.expects(:write).with(equals(@markdown.licenses))
mockFile.expects(:close) mockFile.expects(:close)
......
...@@ -44,9 +44,9 @@ describe Pod::Generator::Plist do ...@@ -44,9 +44,9 @@ describe Pod::Generator::Plist do
end end
it "writes a plist to disk at the given path" do it "writes a plist to disk at the given path" do
basepath = @sandbox.root + "Pods-Acknowledgements" basepath = @sandbox.root + "Pods-acknowledgements"
given_path = @plist.class.path_from_basepath(basepath) given_path = @plist.class.path_from_basepath(basepath)
expected_path = @sandbox.root + "Pods-Acknowledgements.plist" expected_path = @sandbox.root + "Pods-acknowledgements.plist"
Xcodeproj.expects(:write_plist).with(equals(@plist.plist), equals(expected_path)) Xcodeproj.expects(:write_plist).with(equals(@plist.plist), equals(expected_path))
@plist.save_as(given_path) @plist.save_as(given_path)
end end
......
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../../../spec_helper', __FILE__)
describe Pod::Generator::DummySource do describe Pod::Generator::DummySource do
it "generates a dummy sourcefile with the appropriate class for the class name identifier" do it "generates a dummy sourcefile with the appropriate class for the class name identifier" do
generator = Pod::Generator::DummySource.new('SomeIdentification') generator = Pod::Generator::DummySource.new('SomeIdentification')
file = temporary_directory + 'PodsDummy.m' file = temporary_directory + 'PodsDummy.m'
generator.save_as(file) generator.save_as(file)
file.read.should == <<-EOS file.read.should == <<-EOS.strip_heredoc
@interface PodsDummy_SomeIdentification : NSObject @interface PodsDummy_SomeIdentification : NSObject
@end @end
@implementation PodsDummy_SomeIdentification @implementation PodsDummy_SomeIdentification
@end @end
EOS EOS
end end
it "generates a dummy sourcefile with the appropriate class, replacing non-alphanumeric characters with underscores" do it "generates a dummy sourcefile with the appropriate class, replacing non-alphanumeric characters with underscores" do
generator = Pod::Generator::DummySource.new('This!has_non-alphanumeric+characters in it.0123456789') generator = Pod::Generator::DummySource.new('This!has_non-alphanumeric+characters in it.0123456789')
file = temporary_directory + 'PodsDummy.m' file = temporary_directory + 'PodsDummy.m'
generator.save_as(file) generator.save_as(file)
file.read.should == <<-EOS file.read.should == <<-EOS.strip_heredoc
@interface PodsDummy_This_has_non_alphanumeric_characters_in_it_0123456789 : NSObject @interface PodsDummy_This_has_non_alphanumeric_characters_in_it_0123456789 : NSObject
@end @end
@implementation PodsDummy_This_has_non_alphanumeric_characters_in_it_0123456789 @implementation PodsDummy_This_has_non_alphanumeric_characters_in_it_0123456789
@end @end
EOS EOS
end end
end end
...@@ -185,9 +185,9 @@ module Pod ...@@ -185,9 +185,9 @@ module Pod
it "creates the acknowledgements files " do it "creates the acknowledgements files " do
@installer.install! @installer.install!
markdown = config.sandbox.root + 'Pods-Acknowledgements.markdown' markdown = config.sandbox.root + 'Pods-acknowledgements.markdown'
markdown.read.should.include?('Permission is hereby granted') markdown.read.should.include?('Permission is hereby granted')
plist = config.sandbox.root + 'Pods-Acknowledgements.plist' plist = config.sandbox.root + 'Pods-acknowledgements.plist'
plist.read.should.include?('Permission is hereby granted') plist.read.should.include?('Permission is hereby granted')
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