Module: Remarkable::ActiveRecord::Macros
- Includes:
- Matchers
- Included in:
- Spec::Rails::Example::ModelExampleGroup
- Defined in:
- lib/remarkable/active_record/macros.rb
Instance Method Summary collapse
Methods included from Matchers
#allow_mass_assignment_of, #belong_to, #ensure_inclusion_of, #ensure_length_at_least, #ensure_length_in_range, #ensure_length_is, #ensure_length_of, #ensure_value_in_range, #have_and_belong_to_many, #have_class_methods, #have_db_column, #have_db_columns, #have_indices, #have_instance_methods, #have_many, #have_named_scope, #have_one, #have_readonly_attributes, #only_allow_numeric_or_blank_values_for, #only_allow_numeric_values_for, #protect_attributes, #require_acceptance_of, #require_attributes, #require_unique_attributes, #validate_acceptance_of, #validate_associated, #validate_confirmation_of, #validate_exclusion_of, #validate_format_of, #validate_inclusion_of, #validate_length_of, #validate_numericality_of, #validate_presence_of, #validate_uniqueness_of
Instance Method Details
#method_missing_with_remarkable(method_id, *args, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/remarkable/active_record/macros.rb', line 6 def method_missing_with_remarkable(method_id, *args, &block) if method_id.to_s =~ /^should_not_(.*)/ should_not_method_missing($1, *args) elsif method_id.to_s =~ /^should_(.*)/ should_method_missing($1, *args) elsif method_id.to_s =~ /^xshould_(not_)?(.*)/ pending_method_missing($2, $1, *args) else method_missing_without_remarkable(method_id, *args, &block) end end |