Initial commit.

This commit is contained in:
yan
2011-11-17 15:45:33 -06:00
commit 882015bc6d
1819 changed files with 111625 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
context "${1:context}" do
${2}
end

View File

@@ -0,0 +1 @@
should_allow_mass_assignment_of :${1:field}

View File

@@ -0,0 +1 @@
should_allow_values_for :${1:field}, "${2:value}"

View File

@@ -0,0 +1 @@
should_belong_to :${1:association}

View File

@@ -0,0 +1 @@
should_ensure_length_at_least :${1:field}, ${2:min_length}

View File

@@ -0,0 +1 @@
should_ensure_length_is :${1:field}, ${2:length}

View File

@@ -0,0 +1 @@
should_ensure_length_in_range :${1:field}, ${2:start}..${3:end}

View File

@@ -0,0 +1,3 @@
setup do
${1}
end

View File

@@ -0,0 +1 @@
should_ensure_value_in_range :${1:field}, ${2:start}..${3:end}

View File

@@ -0,0 +1 @@
should_have_and_belong_to_many :${1:association}

View File

@@ -0,0 +1 @@
should_have_class_methods :${1:method}

View File

@@ -0,0 +1 @@
should_have_db_columns :${1:field}

View File

@@ -0,0 +1 @@
should_have_indices :${1:field}

View File

@@ -0,0 +1 @@
should_have_instance_methods :${1:method}

View File

@@ -0,0 +1 @@
should_have_many :${1:association}

View File

@@ -0,0 +1 @@
should_have_named_scope :${1:scope}, :conditions => {${2:conditions}}

View File

@@ -0,0 +1 @@
should_have_one :${1:association}

View File

@@ -0,0 +1 @@
should_have_read_only_attributes :${1:field}

View File

@@ -0,0 +1 @@
should_not_allow_mass_assignment_of :${1:field}

View File

@@ -0,0 +1 @@
should_not_allow_values_for :${1:field}, "${2:value}"

View File

@@ -0,0 +1 @@
should_validate_acceptance_of :${1:field}

View File

@@ -0,0 +1 @@
should_validate_numericality_of :${1:field}

View File

@@ -0,0 +1 @@
should_validate_presence_of :${1:field}

View File

@@ -0,0 +1 @@
should_validate_presence_of :${1:field}

View File

@@ -0,0 +1 @@
should_validate_uniqueness_of :${1:field}, :scoped_to => ${2:arrayofnames}