Sha256: ab2754ed7e78cdc2f6a167253bc5f1665ab7baab2bf5530b46fc17776cae04a5

Contents?: true

Size: 582 Bytes

Versions: 9

Compression:

Stored size: 582 Bytes

Contents

require 'assert'

require 'cap-util/fake_cap'

module CapUtil

  class FakeCapTests < Assert::Context
    desc "the fake cap helper"
    setup do
      @fc = FakeCap.new
    end
    subject { @fc }

    should have_imeths :method_missing, :respond_to?
    should have_imeths :run, :fetch, :role
    should have_readers :roles, :cmds_run

    should "store off args to run cmd calls" do
      assert_empty subject.cmds_run

      subject.run(:a, 1)
      assert_equal [:a, 1], subject.cmds_run.last

      subject.run
      assert_equal [], subject.cmds_run.last
    end

  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cap-util-1.0.0 test/fake_cap_tests.rb
cap-util-1.0.0.rc1 test/fake_cap_tests.rb
cap-util-0.4.0 test/fake_cap_tests.rb
cap-util-0.3.0 test/fake_cap_tests.rb
cap-util-0.2.1 test/fake_cap_tests.rb
cap-util-0.2.0 test/fake_cap_tests.rb
cap-util-0.1.2 test/fake_cap_tests.rb
cap-util-0.1.1 test/fake_cap_tests.rb
cap-util-0.1.0 test/fake_cap_tests.rb