diff --git a/lib/record_cache/version_store.rb b/lib/record_cache/version_store.rb index 16b047f..bb29755 100644 --- a/lib/record_cache/version_store.rb +++ b/lib/record_cache/version_store.rb @@ -4,7 +4,7 @@ class VersionStore def initialize(store) [:increment, :write, :read, :read_multi, :delete].each do |method| - raise "Store #{store.inspect} must respond to #{method}" unless store.respond_to?(method) + raise "Store #{store.class.name} must respond to #{method}" unless store.respond_to?(method) end @store = store end diff --git a/spec/lib/version_store_spec.rb b/spec/lib/version_store_spec.rb index fc19666..5baa683 100644 --- a/spec/lib/version_store_spec.rb +++ b/spec/lib/version_store_spec.rb @@ -9,7 +9,7 @@ end it "should only accept ActiveSupport cache stores" do - lambda { RecordCache::VersionStore.new(Object.new) }.should raise_error("Must be an ActiveSupport::Cache::Store") + lambda { RecordCache::VersionStore.new(Object.new) }.should raise_error("Store Object must respond to increment") end context "current" do