Method: Shoulda::Macros#should_create

Defined in:
lib/shoulda/macros.rb

#should_create(class_name) ⇒ Object

Deprecated.

Macro that creates a test asserting that a record of the given class was created.

Example:

context "creating a post" do
  setup { Post.create(post_attributes) }
  should_create :post
end


122
123
124
125
# File 'lib/shoulda/macros.rb', line 122

def should_create(class_name)
  ::ActiveSupport::Deprecation.warn
  should_change_record_count_of(class_name, 1, 'create')
end