Sha256: 0a57ddd2820caf031ee8df7c3a2548f9e6df0776d4133d2b0ecb8d9cb5039d90

Contents?: true

Size: 528 Bytes

Versions: 15

Compression:

Stored size: 528 Bytes

Contents

module ActionController
  module Assertions
    module ModelAssertions
      # Ensures that the passed record is valid by Active Record standards and
      # returns any error messages if it is not.
      #
      # ==== Examples
      #
      #   # assert that a newly created record is valid
      #   model = Model.new
      #   assert_valid(model)
      #
      def assert_valid(record)
        clean_backtrace do
          assert record.valid?, record.errors.full_messages.join("\n")
        end
      end
    end
  end
end

Version data entries

15 entries across 14 versions & 6 rubygems

Version Path
radiant-0.7.2 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
vibes-bj-1.2.2 spec/rails_root/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
vibes-bj-1.2.1 spec/rails_root/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/pkg/actionpack-2.2.2/lib/action_controller/assertions/model_assertions.rb
usher-0.7.0 spec/rails2_2/vendor/rails/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
actionpack-2.2.3 lib/action_controller/assertions/model_assertions.rb
actionpack-2.1.1 lib/action_controller/assertions/model_assertions.rb
actionpack-2.1.0 lib/action_controller/assertions/model_assertions.rb
actionpack-2.1.2 lib/action_controller/assertions/model_assertions.rb
actionpack-2.2.2 lib/action_controller/assertions/model_assertions.rb
antfarm-0.3.0 rails/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
antfarm-0.4.0 rails/vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
eactionpack-2.1.2 lib/action_controller/assertions/model_assertions.rb
radiant-0.7.0 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb
radiant-0.7.1 vendor/rails/actionpack/lib/action_controller/assertions/model_assertions.rb