Sha256: 0349093612a03541216400ba0146ed882a3f7c80a36c63cafad7db42772850ce

Contents?: true

Size: 995 Bytes

Versions: 3

Compression:

Stored size: 995 Bytes

Contents

# encoding: utf-8

describe "Rake::Task[:check]", :tasks do

  # The {#task_invoked?} helper is defined in the spec/support/config/tasks.rb
  # It checks if a task has been invoked.

  let(:task) { Rake::Task[:check] }

  describe ".invoke", :sandbox do

    subject { try_in_sandbox { task.invoke } }

    it "invokes test:coverage" do
      expect { subject }
        .to change { task_invoked? "test:coverage" }
        .to(true)
    end

    it "invokes check:rubocop" do
      expect { subject }
        .to change { task_invoked? "check:rubocop" }
        .to(true)
    end

    it "invokes check:fu" do
      expect { subject }
        .to change { task_invoked? "check:fu" }
        .to(true)
    end

    it "invokes check:inch" do
      expect { subject }
        .to change { task_invoked? "check:inch" }
        .to(true)
    end

    it "invokes check:yardstick" do
      expect { subject }
        .to change { task_invoked? "check:yardstick" }
        .to(true)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hexx-suit-1.5.0-x86_64-linux spec/tests/tasks/check_spec.rb
hexx-suit-1.3.0-x86_64-linux spec/tests/tasks/check_spec.rb
hexx-suit-1.2.0 spec/tests/tasks/check_spec.rb