spec/momm/momm_spec.rb in momm-0.0.4 vs spec/momm/momm_spec.rb in momm-0.0.5

- old
+ new

@@ -21,13 +21,31 @@ it "should respond to update!" do Momm.should respond_to :update! end end - context ".store" do + describe "bridge delegation" do it "should be successfully switch to redis store halfway" do Momm.store :redis_store Momm.send(:calculator).storage.client.should be_a(Redis::Namespace) + Momm.store :memcached + end + + it "should be successfully switch to ECB halfway" do + Momm.source :ECB + Momm.send(:calculator).feed.should be_a(Momm::Feeds::ECB) + end + end + + describe ".setup" do + it "can config" do + Momm.setup do + store :redis_store + end + + Momm.send(:calculator).storage.should be_a(Momm::RedisStore) + Momm.send(:calculator).feed.should be_a(Momm::Feeds::ECB) + Momm.store :memcached end end end \ No newline at end of file