Skip to content

Instantly share code, notes, and snippets.

@peterhellberg
Created June 20, 2012 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterhellberg/2959966 to your computer and use it in GitHub Desktop.
Save peterhellberg/2959966 to your computer and use it in GitHub Desktop.
save_current_checksums
describe "save_current_checksums" do
it "saves the current checksums to redis" do
checksums = { foo: 'bar', baz: 'qux'}
REDIS.keys.must_be_empty
fingerprint.stub(:field_checksums, checksums) do
fingerprint.save_current_checksums
REDIS.get('vision:episode:123456:checksum').
must_equal 'cde20e675ab76c3e183e6ef11c2e2500704ad221'
REDIS.hgetall('vision:episode:123456:fields').
must_equal({ "foo" => "bar", "baz" => "qux" })
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment