diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-13 19:50:38 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-06-13 19:50:38 -0300 |
commit | 2fadc1c5ddbd838b20127d66328ce06176989998 (patch) | |
tree | 7d6ea2ca44c774db8ade3d5bc38d2024fed92274 | |
parent | 52ed3404bc0daf9a13fe83d5a56dbe50b0ad6340 (diff) | |
download | rails-2fadc1c5ddbd838b20127d66328ce06176989998.tar.gz rails-2fadc1c5ddbd838b20127d66328ce06176989998.tar.bz2 rails-2fadc1c5ddbd838b20127d66328ce06176989998.zip |
Remove unneeded .rb suffix on require statements
-rw-r--r-- | railties/guides/source/plugins.textile | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/railties/guides/source/plugins.textile b/railties/guides/source/plugins.textile index fc7c1e2625..a12434a95b 100644 --- a/railties/guides/source/plugins.textile +++ b/railties/guides/source/plugins.textile @@ -205,7 +205,7 @@ def load_schema ActiveRecord::Base.establish_connection(config[db_adapter]) load(File.dirname(__FILE__) + "/schema.rb") - require File.dirname(__FILE__) + '/../rails/init.rb' + require File.dirname(__FILE__) + '/../rails/init' end </ruby> @@ -218,7 +218,7 @@ Once you have these files in place, you can write your first test to ensure that <ruby> # vendor/plugins/yaffle/test/yaffle_test.rb -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' class YaffleTest < Test::Unit::TestCase load_schema @@ -284,7 +284,7 @@ In this example you will add a method to String named +to_squawk+. To begin, cr <ruby> # vendor/plugins/yaffle/test/core_ext_test.rb -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' class CoreExtTest < Test::Unit::TestCase def test_to_squawk_prepends_the_word_squawk @@ -311,7 +311,7 @@ NoMethodError: undefined method `to_squawk' for "Hello World":String Great - now you are ready to start development. -Then in +lib/yaffle.rb+ require +lib/core_ext.rb+: +Then in +lib/yaffle.rb+ require +lib/core_ext+: <ruby> # vendor/plugins/yaffle/lib/yaffle.rb @@ -380,7 +380,7 @@ To begin, set up your files so that you have: * *vendor/plugins/yaffle/test/acts_as_yaffle_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' class ActsAsYaffleTest < Test::Unit::TestCase end @@ -436,7 +436,7 @@ To start out, write a failing test that shows the behavior you'd like: * *vendor/plugins/yaffle/test/acts_as_yaffle_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' class Hickwall < ActiveRecord::Base acts_as_yaffle @@ -489,7 +489,7 @@ To start out, write a failing test that shows the behavior you'd like: * *vendor/plugins/yaffle/test/acts_as_yaffle_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' class Hickwall < ActiveRecord::Base acts_as_yaffle @@ -579,7 +579,7 @@ As always, start with a test: * *vendor/plugins/yaffle/test/woodpecker_test.rb:* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' class WoodpeckerTest < Test::Unit::TestCase load_schema @@ -633,7 +633,7 @@ You can test your plugin's controller as you would test any other controller: * *vendor/plugins/yaffle/test/woodpeckers_controller_test.rb:* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' require 'woodpeckers_controller' require 'action_controller/test_process' @@ -693,7 +693,7 @@ You can test your plugin's helper as you would test any other helper: * *vendor/plugins/yaffle/test/woodpeckers_helper_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' include WoodpeckersHelper class WoodpeckersHelperTest < Test::Unit::TestCase @@ -816,7 +816,7 @@ This section will describe how to create a simple generator that adds a file. F * *vendor/plugins/yaffle/test/definition_generator_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' require 'rails_generator' require 'rails_generator/scripts/generate' @@ -990,7 +990,7 @@ To start, add the following test method: * *vendor/plugins/yaffle/test/route_generator_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' require 'rails_generator' require 'rails_generator/scripts/generate' require 'rails_generator/scripts/destroy' @@ -1205,7 +1205,7 @@ This example will demonstrate how to use one of the built-in generator methods n * *vendor/plugins/yaffle/test/yaffle_migration_generator_test.rb* <ruby> -require File.dirname(__FILE__) + '/test_helper.rb' +require File.dirname(__FILE__) + '/test_helper' require 'rails_generator' require 'rails_generator/scripts/generate' |