def proxies_of_legacy_code_that_are_not_changed(self):
     self.legacy_object = self.LegacyPeopleClass("Taro", 32)
     #recording
     self.config = setting.PySpecConfig()
     proxy1 = test_proxy(self.legacy_object,
                         runtime_option=self.config.runtime)
     proxy1.get_name()
 def proxies_of_legacy_code_these_return_values_are_changed(self):
     legacy_object1 = self.LegacyPeopleClass("Taro", 32)
     self.legacy_object2 = self.LegacyPeopleClass("Jiro", 30)
     #recording
     self.config = setting.PySpecConfig()
     proxy1 = test_proxy(legacy_object1, runtime_option=self.config.runtime)
     proxy1.get_name()  # return "Taro"
 def legacy_record_was_recorded_at_past_time_and_reset_flag_on(self):
     self.config = setting.PySpecConfig()
     self.key = self.config.runtime._reference_key("legacy_data")
     self.config.runtime.get_recorded_value("legacy_data", 10)
     self.config.runtime.start_spec()  # reset index
     self.expected_value = 20
     self.value, self.is_changed = self.config.runtime.get_recorded_value(
         "legacy_data", self.expected_value, reset=True)
 def recording_key_generator_was_called_once(self):
     config = setting.PySpecConfig()
     self.module_name = "TestModule"
     self.class_name = "Behavior_Something"
     self.method_name = "XXX_should_do"
     self.variable_name = "test_data"
     config.runtime.module_name = self.module_name
     config.runtime.class_name = self.class_name
     config.runtime.method_name = self.method_name
     self.result = config.runtime._recording_key(self.variable_name)
     self.expected_index = 0
 def should_equal_fail_message_in_english(self):
     config = setting.PySpecConfig()
     self.english_message = config.language.get('should_equal',
                            'fail', variable_name='age',
                            expected_value='27',
                            actual_value='29')
 def a_config_that_was_set_invalid_language(self):
     self.config = setting.PySpecConfig()
     # pyspec can't accept tlhIngan Hol!
     self.config.language.set_language('tlh')
 def a_config_that_was_set_valid_language(self):
     self.config = setting.PySpecConfig()
     self.config.language.set_language('ja')
 def a_default_config(self):
     self.config = setting.PySpecConfig()
 def legacy_record_was_recorded(self):
     self.config = setting.PySpecConfig()
     self.key = self.config.runtime._reference_key("legacy_data")
     self.expectec_value = 10
     self.value, self.is_changed = self.config.runtime.get_recorded_value(
         "legacy_data", self.expectec_value)
 def legacy_record_without_record(self):
     self.config = setting.PySpecConfig()
     self.key = config.runtime._reference_key("legacy_data")
 def reference_key_was_called_twice_with_same_variable_name(self):
     config = setting.PySpecConfig()
     self.first_result = config.runtime._reference_key("test_data")
     self.second_result = config.runtime._reference_key("test_data")
 def attribute_access_to_the_proxy_of_legacy_code(self):
     legacy_object = self.LegacyPeopleClass("Taro", 32)
     self.config = setting.PySpecConfig()
     proxy = test_proxy(legacy_object, runtime_option=self.config.runtime)
     print proxy.name
 def method_call_to_the_proxy_of_legacy_code(self):
     legacy_object = self.LegacyPeopleClass("Taro", 32)
     self.config = setting.PySpecConfig()
     proxy = test_proxy(legacy_object, runtime_option=self.config.runtime)
     print proxy.get_name()
 def the_value_changed_in__should_not_be_changed__(self):
     self.config = setting.PySpecConfig()
     self.fixture1 = self.LegacySupportFixture(10)
     self.fixture2 = self.LegacySupportFixture(20)