提交 2fadc1c5 编写于 作者: S Santiago Pastorino

Remove unneeded .rb suffix on require statements

上级 52ed3404
......@@ -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'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册