Sha256: 8e36273287865a42af108fb2204bfdc79ec35b9f5fd0066c2b45dd68c6ae866e

Contents?: true

Size: 952 Bytes

Versions: 6

Compression:

Stored size: 952 Bytes

Contents

require "test_helper"
require "./lib/roger/cli"
require "test_construct"

require File.dirname(__FILE__) + "/../../helpers/cli"

module Roger
  # These tests ar for the roger generate command
  class CliReleaseTest < ::Test::Unit::TestCase
    include TestConstruct::Helpers
    include TestCli

    def setup
      # Reset project as not to leak from other tests
      Cli::Base.project = nil

      @base_path = setup_construct
      @base_path.directory "html" do |h|
        h.file "index.html"
      end
      @base_path.file "Rogerfile", "roger.release(scm: :fixed) { |r| r.scm.version = '1' }"
    end

    def teardown
      teardown_construct(@base_path)
      Cli::Base.project = nil
    end

    # roger generate
    def test_has_release_command
      assert_includes Cli::Base.tasks.keys, "release"
    end

    def test_runs_release
      run_command(%w(release))
      assert File.exist?(@base_path + "releases/html-1")
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
roger-1.10.0 test/unit/cli/cli_release_test.rb
roger-1.9.1 test/unit/cli/cli_release_test.rb
roger-1.9.0 test/unit/cli/cli_release_test.rb
roger-1.8.0 test/unit/cli/cli_release_test.rb
roger-1.7.2 test/unit/cli/cli_release_test.rb
roger-1.7.1 test/unit/cli/cli_release_test.rb