lib/verdict/storage/mock_storage.rb in verdict-0.3.2 vs lib/verdict/storage/mock_storage.rb in verdict-0.4.0

- old
+ new

@@ -1,38 +1,16 @@ module Verdict module Storage - class MockStorage - # Should store the assignments to allow quick lookups. - # - Assignments should be unique on the combination of - # `assignment.experiment.handle` and `assignment.subject_identifier`. - # - The main property to store is `group.handle` - # - Should return true if stored successfully. - def store_assignment(assignment) + class MockStorage < BaseStorage + def set(scope, key, value) false end - # Should do a fast lookup of an assignment of the subject for the given experiment. - # - Should return nil if not found in store - # - Should return an Assignment instance otherwise. - def retrieve_assignment(experiment, subject_identifier) + def get(scope, key) nil end - # Should remove the subject from storage, so it will be reassigned later. - def remove_assignment(experiment, subject_identifier) - end - - # Should clear out the storage used for this experiment - def clear_experiment(experiment) - end - - # Retrieves the start timestamp of the experiment - def retrieve_start_timestamp(experiment) - nil - end - - # Stores the timestamp on which the experiment was started - def store_start_timestamp(experiment, timestamp) + def remove(scope, key) end end end end