class Thoughtbot::Shoulda::Context
def create_test_from_should_hash(should)
def create_test_from_should_hash(should) test_name = ["test:", full_name, "should", "#{should[:name]}. "].flatten.join(' ').to_sym if test_unit_class.instance_methods.include?(test_name.to_s) warn " * WARNING: '#{test_name}' is already defined" end context = self test_unit_class.send(:define_method, test_name) do begin context.run_parent_setup_blocks(self) should[:before].bind(self).call if should[:before] context.run_current_setup_blocks(self) should[:block].bind(self).call ensure context.run_all_teardown_blocks(self) end end end