Sha256: dbb06412ff14652622ddd85c71bf982373001aed5a0a7639afb0fbb2fc96f4aa

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

require "test_helper"

class DelegationTest < Minitest::Test
  setup do
    @strategy = mock("strategy")
    Storage.expects(:strategy).returns(@strategy)
  end

  test "delegate save method" do
    @strategy.expects(:store).with("some/file")
    Storage.store "some/file"
  end

  test "delegate destroy method" do
    @strategy.expects(:remove).with("some/file")
    Storage.remove "some/file"
  end

  test "delegate get method" do
    @strategy.expects(:get).with("some/file")
    Storage.get "some/file"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
storage-0.3.3 test/unit/delegation_test.rb