Skip to content

Instantly share code, notes, and snippets.

describe 'without_callbacks' do
before(:all) { disable_ar_callbacks }
after(:all) { enable_ar_callbacks }
it { should ensure_length_of(:Description).is_at_most(2000) }
it { should ensure_length_of(:Keywords).is_at_most(1000) }
it { should have_many :aws_turk_hit_requests }
it { should validate_numericality_of :AutoGrantedValue }
# DataObjects::Schema::
# Database
# Table
#
# Column::
# String < Column
# Numeric < Column
# Integer < Numeric
# Float < Numeric
# Decimal < Numeric
@febuiles
febuiles / newFile
Created October 16, 2009 00:31 — forked from diegoeche/newFile
Cuando un proyecto (de software) uno lo empieza a hacer con otra gente, y uno no sabe
si las ideas sobre la api estan bien o depronto de un día para otro le da a uno por
reescribir toda la API porque descubrió una forma mas linda. O no se tenían coding
guidelines y se establecen. Vale la pena haber hecho una documentación seria?
Ahí miré los casos que ponés. Rails vs la api que mostras ¿Qué proyecto está mas
maduro? ¿La documentación de emacs que tanto riesgo tiene de quedarse obsoleta de un
día para otro?
A mi una wiki me parece una buena forma de empezar a documentar un proyecto en sus
require File.join(File.dirname(__FILE__), 'spec_helper')
describe PhrasesMatcher do
before(:each) do
@matcher = PhrasesMatcher.new
@result1 = Recoup.new("hey guys what is the menu today?").start
@result2 = Recoup.new("what do you have today in the menu?").start
end
#given a parsed text, it should find the phrase's answer that matches the text.
#include <stdlib.h>
#include <stdio.h>
main(){
int i;
int *arreglo;
arreglo = (int *)malloc(sizeof(int));
for(i = 0; i < 10; i++){
arreglo = realloc(arreglo, (i + 1) * sizeof(int)); /* importante que sea i + 1 pa no