Brainstorming a list of Rails Quiz Questions for a Junior RoR Developer

Which files are created by the rails plugin new foo generator (assuming you haven’t patched the generator), and what do they do?

  • README.rdoc – Where you put documentation
  • Rakefile – Creates standard rake tasks for the gem. rdoc, and test.
  • foo.gemspec – Standard gemspec doc to load in lib/foo, the version file, declares Spec data for pushing to a gem repo, explicitly declares where gem files, test files, dependencies, and dev dependencies are.
  • MIT-LICENSE – self explanatory
  • .gitignore – self explanatory
  • Gemfile – declare your gem’s dependencies – blank by default
  • lib/foo.rb – empty module declaration
  • lib/tasks/foo_tasks.rake – where you add plugin specific tasks
  • lib/foo/version.rb – sets version to 0.0.1 by default
  • test/test_helper.rb – configures the rails environment for test running. Loads in environment.rb from the dummy folder, the default rails test help file, removes backtrace silencers (so they are LOUD), loads support files, and loads fixtures if :fixture_path is set.
  • test/foo_test.rb – has a test to assert Foo is a module.
  • and then it generates an entire rails app in test/dummy

Comments are closed.