spec/dependencies_spec.rb in dev_tasks-0.0.163 vs spec/dependencies_spec.rb in dev_tasks-0.0.164

- old
+ new

@@ -1,23 +1,28 @@ require_relative '../lib/dependencies.rb' describe Dependencies do + it "should be able to extract C# system dependencies" do - system_deps = Dependencies.csharp_system_dependencies File.read("#{File.dirname(__FILE__)}/test_data/csharp_projects/JsonNet.Test.csproj") - expect(system_deps.length).to eq(7) - expect(system_deps.include?('System')).to eq(true) - expect(system_deps.include?('System.Xml')).to eq(true) - expect(system_deps.include?('Microsoft.CSharp')).to eq(true) + system_deps = Dependencies.csharp_system_dependencies File.read( + "#{File.dirname(__FILE__)}/test_data/csharp_projects/JsonNet.Test.csproj", + :encoding=>'UTF-8') + expect(system_deps.length).to eq(7) + expect(system_deps.include?('System')).to eq(true) + expect(system_deps.include?('System.Xml')).to eq(true) + expect(system_deps.include?('Microsoft.CSharp')).to eq(true) end it "should be able to extract C# file dependencies" do - system_deps = Dependencies.csharp_file_dependencies File.read("#{File.dirname(__FILE__)}/test_data/csharp_projects/JsonNet.Test.csproj") - expect(system_deps.length).to eq(2) - expect(system_deps.include?('dep\github\lou-parslow\NetLibs\develop\NUnit\2.6.3\bin\framework\nunit.framework.dll')).to eq(true) + system_deps = Dependencies.csharp_file_dependencies File.read( + "#{File.dirname(__FILE__)}/test_data/csharp_projects/JsonNet.Test.csproj", + :encoding=>'UTF-8') + expect(system_deps.length).to eq(2) + expect(system_deps.include?('dep\github\lou-parslow\NetLibs\develop\NUnit\2.6.3\bin\framework\nunit.framework.dll')).to eq(true) end it "should be able to extract ruby dependencies" do system_deps = Dependencies.ruby_dependencies File.read("#{File.dirname(__FILE__)}/test_data/example.rb") - expect(system_deps.length).to eq(2) - expect(system_deps.include?('json')).to eq(true) + expect(system_deps.length).to eq(2) + expect(system_deps.include?('json')).to eq(true) end end \ No newline at end of file