50onRed / mock-jedis

Mock Jedis is a library for mocking out Jedis clients
MIT License
82 stars 47 forks source link

Redundant host argument in MockJedis #27

Open savinov opened 10 years ago

savinov commented 10 years ago

Why MockJedis constructor has host argument? You can set Jedis host argument to default value, "test" for example and add MockJedis() default constructor.

idyedov commented 10 years ago

what if someone has "test" defined in their hosts file and calls a method that we don't override?

I think a default value doesn't hurt, but we'd still need a way to override it

savinov commented 10 years ago

Well, you can set "mock-jedis" as default value, I don't think that anybody has it in /etc/hosts. If anybody want to set host argument, he can use constructor with argument.

idyedov commented 10 years ago

I'll see if I can add it sometime this week, or if you were to submit a pull request adding such a constructor, I would happily merge it in