1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-10-30 06:34:09 +00:00

Rename DEFAULT to DEFAULT_RULES

This commit is contained in:
nvbn
2015-04-22 22:37:11 +02:00
parent 20b6c4c160
commit 54c408a6b5
4 changed files with 14 additions and 14 deletions

View File

@@ -11,9 +11,9 @@ def test_rules_names_list():
def test_default():
assert Rule('test', None, None, True) in conf.DEFAULT
assert Rule('test', None, None, False) not in conf.DEFAULT
assert Rule('test', None, None, False) in (conf.DEFAULT + ['test'])
assert Rule('test', None, None, True) in conf.DEFAULT_RULES
assert Rule('test', None, None, False) not in conf.DEFAULT_RULES
assert Rule('test', None, None, False) in (conf.DEFAULT_RULES + ['test'])
def test_settings_defaults():
@@ -37,13 +37,13 @@ def test_settings_from_file():
def test_settings_from_file_with_DEFAULT():
with patch('thefuck.conf.load_source', return_value=Mock(rules=conf.DEFAULT + ['test'],
with patch('thefuck.conf.load_source', return_value=Mock(rules=conf.DEFAULT_RULES + ['test'],
wait_command=10,
require_confirmation=True,
no_colors=True)), \
patch('thefuck.conf.os.environ', new_callable=lambda: {}):
settings = conf.get_settings(Mock())
assert settings.rules == conf.DEFAULT + ['test']
assert settings.rules == conf.DEFAULT_RULES + ['test']
def test_settings_from_env():
@@ -63,9 +63,9 @@ def test_settings_from_env():
def test_settings_from_env_with_DEFAULT():
with patch('thefuck.conf.load_source', return_value=Mock()), \
patch('thefuck.conf.os.environ', new_callable=lambda: {'THEFUCK_RULES': 'DEFAULT:bash:lisp'}):
patch('thefuck.conf.os.environ', new_callable=lambda: {'THEFUCK_RULES': 'DEFAULT_RULES:bash:lisp'}):
settings = conf.get_settings(Mock())
assert settings.rules == conf.DEFAULT + ['bash', 'lisp']
assert settings.rules == conf.DEFAULT_RULES + ['bash', 'lisp']
def test_update_settings():