w10schools
Login Register
  • Home
  • Tutorials
    • HTML, CSS
      • HTML, HTML5
      • CSS, CSS3
    • XML
    • JavaScript, AJAX
    • PHP
    • Ruby on Rails
      • Ruby
      • Rails
    • ASP.NET
      • ASP
      • C# .NET
    • Java
      • JSP
    • Databases
      • MySQL
      • MSSQL Server
      • Oracle
    • Web Server
      • Windows
      • Linux
      • Apache
      • IIS
    • Design
      • Dreamweaver
      • Flash
      • Photoshop
      • Fireworks
      • CorelDRAW
      • Illustrator
  • References
    • HTML
      • Bootstrap
    • CSS
      • CSS Selectors
      • Sass
    • JavaScript
    • Mobile Apps
      • Cordova
    • Ruby on Rails
      • Ruby
      • Rails
    • PHP
      • Function
      • Language
      • CodeIgniter
      • Phalcon
      • PHPUnit
      • Symfony
      • Drupal
      • Yii
      • Laravel
    • Perl
      • Perl
    • Python
      • Python
      • Django
      • NumPy
      • Pandas
      • scikit-image
      • scikit-learn
      • Statsmodels
      • Matplotlib
    • Lua
      • Lua
    • C, C++
      • C
      • C++
    • Server
      • Docker
      • Apache HTTP Server
      • Nginx
    • Database
      • PostgreSQL
    • Big Data
      • TensorFlow
    • Game Development
      • Phaser
      • LÖVE
  • Articles
    • News
    • General
      • Website Promotion
      • Online Advertising
      • Make Money Online
    • Editorials
    • Interviews
    • Web Roundups
  • Resources
    • Design
      • Fonts
      • Graphics
      • Vectors
      • Templates
      • UI (User Interface)
      • Brushes
      • Patterns, Backgrounds
      • Textures
    • Web Development
      • HTML, CSS
      • XML
      • JavaScript, AJAX
      • Ruby on Rails
      • PHP
      • Java
      • .NET
      • Python
      • Perl
      • Flash
    • Mobile Application Development
      • Mobile Development Tools
      • Swift
    • Online Services
      • Online Storage
      • Web Hosting
  • Tools
    • Generators
Edit
In Place Editing Advanced Editing
  • References
  • Ruby on Rails
  • Rails
  • Classes
  • Rails
  • Rails::Generators
  • Rails::Generators::Testing
  • Rails::Generators::Testing::Assertions

assert_no_file

assert_no_file(relative)
Instance Public methods

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"

assert_no_directory

Links:
  • https://github.com/rails/rails/blob/abec22e01d90d0da2b717d2330928c71ed6fe634/railties/lib/rails/generators/testing/assertions.rb#L47
doc_ruby_on_rails
doc_ruby_on_rails
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.

Popular Articles
assert_no_emails assert_no_emails(&block) Instance Public methods Assert that no emails have been sent. def test_emails assert_no_emails ContactM
assert_no_directory assert_no_directory(relative) Instance Public methods Alias for: assert_no_file
assert_no_migration assert_no_migration(relative) Instance Public methods Asserts a given migration does not exist. You need to supply an absolute path or a
assert_no_tag assert_no_tag(*opts) Instance Public methods Identical to assert_tag, but asserts that a matching tag does not exist. (See assert_tag fo
assert_no_difference assert_no_difference(expression, message = nil, &block) Instance Public methods Assertion that the numeric result of evaluating an e


Return to View
  • Facebook
  • Tweet
  • Digg it
  • Stumbleupon
  • Delicious
  • Plus Share

Designed by : w10schools

service@w10schools.com

Our Partners: aeeble – Providing content publishing and search solutions