instance method assert_no_file

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

assert_no_file(relative)

Asserts a given file does not exist. You need to supply an absolute path or a path relative to the configured destination:

assert_no_file "config/random.rb"

Parameters

relative req
Source
# File railties/lib/rails/generators/test_case.rb, line 111
      def assert_no_file(relative)
        absolute = File.expand_path(relative, destination_root)
        assert !File.exists?(absolute), "Expected file #{relative.inspect} to not exist, but does"
      end

Defined in railties/lib/rails/generators/test_case.rb line 111 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Rails::Generators::TestCase

Type at least 2 characters to search.

↑↓ navigate · open · esc close