Sha256: c5f62226081987d9546b0cd35f741e27148c8db1f66b4ca082d0acdef7075234

Contents?: true

Size: 813 Bytes

Versions: 3

Compression:

Stored size: 813 Bytes

Contents

# class NewClass < ActiveRecord::Base
#   validates_presence_of :code
#   validates_uniqueness_of :code
# end
# 
# context "is_recognized_hash_style" do
#   setup do
#     NewClass.connection.execute("CREATE TABLE new_classes (id INT AUTO_INCREMENT, code TEXT, name TEXT, PRIMARY KEY(id));")
#     @obj = NewClass.create(:code => 'ABC', :name => 'Full Object Name')
#     @hsh = {:newclass_code => "DEF", :newclass_name => "Another Object Name"}
#   end
#   
#   # specify "should raise an error when called on a class with no recognize_hash_style method" do
#   #   lambda { NewClass.is_recognized_hash_style?(@hsh) }.should raise_error(RuntimeError, "NewClass does not have a recognize_hash_style method")
#   # end
#   
#   teardown do
#     NewClass.connection.execute("DROP TABLE new_classes;")
#   end
# end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cheap_imports-0.0.4 spec/orms/active_record_spec.rb
cheap_imports-0.0.3 spec/orms/active_record_spec.rb
cheap_imports-0.0.2 spec/orms/active_record_spec.rb