Sha256: 96ab243fdacf80703be2b400d20d0c29cf1ac9428953d22c8c3d691f11d7a037
Contents?: true
Size: 1.7 KB
Versions: 2
Compression:
Stored size: 1.7 KB
Contents
# v3.0.0 [ENHANCEMENT] Added more options to associations matcher. Previously it was handling just :dependent and :through options. Now it deals with: :through, :class_name, :foreign_key, :dependent, :join_table, :uniq, :readonly, :validate, :autosave, :counter_cache, :polymorphic And they are much smarter! In :join_table and :through cases, they also test if the table exists or not. :counter_cache and :foreign_key also checks if the column exists or not. [COMPATIBILITY] Removed callback, have_instance_method and have_class_method matchers. They don't lead to a good TDD since you should test they behavior and not wether they exist or not. [COMPATIBILITY] ActiveRecord matches does not pick the instance variable from the spec environment. So we should target only rspec versions that supports subjects (>= 1.1.12). Previously, when we are doing this: describe Product before(:each){ @product = Product.new(:tangible => true) } should_validate_presence_of :size end It was validating the @product instance variable. However this might be not clear. The right way to do that (with subjects) is: describe Product subject{ Product.new(:tangible => true) } should_validate_presence_of :size end Is also valid to remember that previous versions of Remarkable were overriding subject definitions on rspec. This was also fixed. # v2.x [ENHANCEMENT] Added associations, allow_mass_assignment, allow_values_for, have_column, have_index, have_scope, have_readonly_attributes, validate_acceptance_of, validate_associate, validate_confirmation_of, validate_exclusion_of, validate_inclusion_of, validate_length_of, validate_numericality_of, validate_presence_of and validate_uniqueness_of matchers.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
remarkable_activerecord-3.0.0 | CHANGELOG |
remarkable_activerecord-3.0.1 | CHANGELOG |