声明:JavaEye新闻文章的版权属于JavaEye网站所有,严禁任何网站转载本文,否则必将追究法律责任!
Ruby on Rails的BDD测试框架RSpec发布了1.1版,这个版本有如下新的特征:
1、The RSpec Story Runner
2、Nested Example Groups
3、Support for Rails 2.0.1
4、Test::Unit interoperability
一、RSpec Story Runner
RSpec Story Runner是Dan North开发的一个框架,能够用来描述抽象的用户故事,并且可以执行这些用户故事来进行用户验收测试。RSpec1.1同时也集成了RailsStory,能够让你在Rails里面编写可以运行的用户故事。
二、Nested Example Groups
可以在describe里面再嵌入describe
三、支持Rails2.0
四、Test::Unit Interoperability
可以让你把ruby的单元测试代码顺利的迁移到rspec上面来。
请看详细的说明:
http://blog.davidchelimsky.net/articles/2007/12/14/rspec-1-1
1、The RSpec Story Runner
2、Nested Example Groups
3、Support for Rails 2.0.1
4、Test::Unit interoperability
一、RSpec Story Runner
RSpec Story Runner是Dan North开发的一个框架,能够用来描述抽象的用户故事,并且可以执行这些用户故事来进行用户验收测试。RSpec1.1同时也集成了RailsStory,能够让你在Rails里面编写可以运行的用户故事。
二、Nested Example Groups
describe RubyDeveloper do
before(:each) do
@ruby_developer = RubyDeveloper.new
end
describe "using RSpec 1.1.0" do
before(:each) do
@ruby_developer.use_rspec('1.1.0')
end
it "should be able to nest example groups" do
@ruby_developer.should be_able_to_nest_example_groups
end
end
describe "using RSpec 1.0.1" do
before(:each) do
@ruby_developer.use_rspec('1.0.8')
end
it "should not be able to nest example groups" do
@ruby_developer.should_not be_able_to_nest_example_groups
end
end
end
可以在describe里面再嵌入describe
三、支持Rails2.0
四、Test::Unit Interoperability
可以让你把ruby的单元测试代码顺利的迁移到rspec上面来。
请看详细的说明:
http://blog.davidchelimsky.net/articles/2007/12/14/rspec-1-1


评论 共 1 条 发表评论
hongkong 2007-12-17 21:17 引用