spec/lib/spec_generator_spec.rb in gjp-0.20.0 vs spec/lib/spec_generator_spec.rb in gjp-0.21.0

- old
+ new

@@ -27,11 +27,11 @@ describe "#generate_kit_spec" do it "generates the first version" do @spec_generator.generate_kit_spec.should be_true @project.from_directory do - spec_lines = File.readlines(File.join("specs", "test-project-kit.spec")) + spec_lines = File.readlines(File.join("output", "test-project-kit", "test-project-kit.spec")) spec_lines.should include("Name: test-project-kit\n") spec_lines.should include("Version: 1\n") spec_lines.should include("Source0: %{name}.tar.xz\n") end end @@ -40,20 +40,20 @@ @project.dry_run Dir.chdir(@project_path) do test_file = File.join("kit", "test") File.open(test_file, "w") { |io| io.puts "changed kit content test file" } - File.open(File.join("specs", "test-project-kit.spec"), "a") do |io| + File.open(File.join("output", "test-project-kit", "test-project-kit.spec"), "a") do |io| io.write("nonconflicting line") end end @project.finish(false) @spec_generator.generate_kit_spec.should be_true @project.from_directory do - spec_lines = File.readlines(File.join("specs", "test-project-kit.spec")) + spec_lines = File.readlines(File.join("output", "test-project-kit", "test-project-kit.spec")) spec_lines.should include("Name: test-project-kit\n") spec_lines.should include("Version: 2\n") spec_lines.should include("Source0: %{name}.tar.xz\n") spec_lines.should include("nonconflicting line\n") end @@ -63,11 +63,11 @@ @project.dry_run Dir.chdir(@project_path) do test_file = File.join("kit", "test") File.open(test_file, "w") { |io| io.puts "changed kit content test file" } - spec_path = File.join("specs", "test-project-kit.spec") + spec_path = File.join("output", "test-project-kit", "test-project-kit.spec") spec_contents = File.read spec_path spec_contents.gsub! /^Version:.*$/, "CONFLICTING!" File.open(spec_path, "w+") do |io| @@ -77,11 +77,11 @@ @project.finish(false) @spec_generator.generate_kit_spec.should be_true @project.from_directory do - spec_lines = File.readlines(File.join("specs", "test-project-kit.spec")) + spec_lines = File.readlines(File.join("output", "test-project-kit", "test-project-kit.spec")) spec_lines.should include("Name: test-project-kit\n") spec_lines.should include("Source0: %{name}.tar.xz\n") spec_lines.should include("<<<<<<< newly generated\n") spec_lines.should include("Version: 2\n") spec_lines.should include("=======\n") @@ -113,10 +113,10 @@ end @spec_generator.generate_package_spec "test", File.join("spec", "data", "nailgun", "pom.xml"), "*.jar" @project.from_directory do - spec_lines = File.readlines(File.join("specs", "test.spec")) + spec_lines = File.readlines(File.join("output", "test", "test.spec")) spec_lines.should include("Name: test\n") spec_lines.should include("License: The Apache Software License, Version 2.0\n") spec_lines.should include("Summary: Nailgun is a client, protocol, and server for running Java\n") spec_lines.should include("Url: http://martiansoftware.com/nailgun\n") spec_lines.should include("BuildRequires: #{@project.name}-kit >= 2\n")