-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #554 from colemanja91/require-memcached-adapter
Require Memcached adapter; add test
- Loading branch information
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# frozen_string_literal: true | ||
|
||
require File.expand_path("../../test_helper", File.dirname(__FILE__)) | ||
|
||
if ENV["COVERBAND_MEMCACHED"] | ||
require "active_support" | ||
require "dalli" | ||
|
||
class MemcachedTest < Minitest::Test | ||
def setup | ||
super | ||
@store = Coverband::Adapters::MemcachedStore.new(ActiveSupport::Cache::MemCacheStore.new) | ||
end | ||
|
||
def test_coverage | ||
@store.clear! | ||
mock_file_hash | ||
expected = basic_coverage | ||
@store.save_report(expected) | ||
assert_equal expected.keys, @store.coverage.keys | ||
@store.coverage.each_pair do |key, data| | ||
assert_equal expected[key], data["data"] | ||
end | ||
end | ||
end | ||
end |