Sha256: af4045d0ff7ef655a7d204747c42cd22a89181c3651b95c86de3b17102ce4231
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
# encoding: UTF-8 require "spec_helper" describe Tetra::Scriptable do include Tetra::Mockers before(:each) do create_mock_project @project.from_directory do FileUtils.mkdir_p(File.join("src", "test-package")) @project.dry_run history = ["tetra dry-run start --unwanted-options", "cd somewhere significant", "tetra mvn --options", "tetra dry-run finish -a" ] @project.finish(history) end create_mock_executable("ant") create_mock_executable("mvn") end after(:each) do delete_mock_project end describe "#generate_build_script" do it "generates a build script from the history" do @project.from_directory do @package = Tetra::Package.new(@project) @package.to_script lines = File.readlines(File.join("packages", "test-project", "build.sh")) expect(lines).to include("#!/bin/bash\n") expect(lines).to include("cd somewhere significant\n") expect(lines).to include("$PROJECT_PREFIX/kit/mvn/bin/mvn \ -Dmaven.repo.local=$PROJECT_PREFIX/kit/m2 --settings $PROJECT_PREFIX/kit/m2/settings.xml \ --strict-checksums -o --options\n" ) expect(lines).not_to include("some earlier command\n") expect(lines).not_to include("tetra dry-run --unwanted-options\n") expect(lines).not_to include("tetra dry-run --unwanted-options\n") expect(lines).not_to include("tetra finish -a\n") expect(lines).not_to include("some later command\n") end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tetra-0.52.0 | spec/lib/scriptable_spec.rb |