Permalink
Browse files

have_db_column matcher done

  • Loading branch information...
1 parent da5a4f7 commit d261e12e36e780d284c8329ea06a90a17958e0da @croaky croaky committed with jferris Jan 24, 2009
Showing with 3 additions and 7 deletions.
  1. +2 −4 lib/shoulda/active_record/macros.rb
  2. +0 −2 test/matchers/have_db_column_matcher_test.rb
  3. +1 −1 test/unit/user_test.rb
@@ -412,13 +412,11 @@ def should_have_instance_methods(*methods)
# Ensure that the given columns are defined on the models backing SQL table.
# Also aliased to should_have_index for readability.
# Takes the same options available in migrations:
- # :type, :precision, :limit, :default, :null, :scale, and :sql_type
+ # :type, :precision, :limit, :default, :null, and :scale
#
# should_have_db_columns :id, :email, :name, :created_at
#
- # should_have_db_column :email, :type => "string",
- # :limit => 255,
- # :sql_type => 'varchar(255)'
+ # should_have_db_column :email, :type => "string", :limit => 255
# should_have_db_column :salary, :decimal, :precision => 15, :scale => 2
# should_have_db_column :admin, :default => false, :null => false
#
@@ -166,6 +166,4 @@ class HaveDbColumnMatcherTest < Test::Unit::TestCase # :nodoc:
end
end
- # :sql_type
-
end
@@ -45,7 +45,7 @@ class UserTest < Test::Unit::TestCase
should_have_db_columns :name, :email, :age
should_have_db_column :id, :type => "integer"
should_have_db_column :email, :type => "string", :default => nil, :precision => nil, :limit => 255,
- :null => true, :scale => nil, :sql_type => 'varchar(255)'
+ :null => true, :scale => nil
should_require_acceptance_of :eula
should_require_unique_attributes :email, :scoped_to => :name, :case_sensitive => false

0 comments on commit d261e12

Please sign in to comment.