Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
2fadc1c5
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2fadc1c5
编写于
6月 13, 2010
作者:
S
Santiago Pastorino
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unneeded .rb suffix on require statements
上级
52ed3404
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
13 deletion
+13
-13
railties/guides/source/plugins.textile
railties/guides/source/plugins.textile
+13
-13
未找到文件。
railties/guides/source/plugins.textile
浏览文件 @
2fadc1c5
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录