如何定制Rspec文档格式

如何定制Rspec文档格式,rspec,Rspec,当我执行rspec规范时,我会通过以下方式获得测试报告: Course Group Loged in In the new course group form Create a new Group course Create a new Group course with complex name (FAILED - 1) Create a new Group course with 3 subjects (FAILED - 2) 1) Cour

当我执行rspec规范时,我会通过以下方式获得测试报告:

Course Group
  Loged in
    In the new course group form
      Create a new Group course
      Create a new Group course with complex name (FAILED - 1)
      Create a new Group course with 3 subjects (FAILED - 2)

1) Course Group Loged in In the new course group form Create a new Group course with complex name
     Failure/Error: course_groupDB.courses.count.should == 1
       expected: 1
            got: 0 (using ==)
     # ./spec/acceptance/course_group_spec.rb:40:in `block (4 levels) in <top (required)>'

2) Course Group Loged in In the new course group form Create a new Group course with 3 subjects
     Failure/Error: course_groupDB.courses.count.should == 3
       expected: 3
            got: 0 (using ==)
     # ./spec/acceptance/course_group_spec.rb:54:in `block (4 levels) in <top (required)>'
课程组
登录
以新课程组的形式
创建一个新的小组课程
创建具有复杂名称的新小组课程(失败-1)
创建包含3个科目的新小组课程(失败-2)
1) 在“新建课程组”窗体中登录的课程组创建具有复杂名称的新组课程
失败/错误:course\u groupDB.courses.count.should==1
预期:1
获取:0(使用==)
#./规格/验收/课程\小组\规格rb:40:in'block(4级)in'
2) 在新课程组窗体中登录课程组创建包含3个科目的新课程组
失败/错误:course\u groupDB.courses.count.should==3
预期:3
获取:0(使用==)
#./规格/验收/课程\小组\规格rb:54:in‘分块(4级)’in’
请注意,在最后列出失败时,名称非常混乱,因为它混合了所有上下文、描述和示例

有没有一种方法可以像之前列出的那样展示它

像这样:

1) Course Group 
   Loged in 
         In the new course group form 
            Create a new Group course with complex name
                Failure/Error: course_groupDB.courses.count.should == 1
                       expected: 1
                            got: 0 (using ==)
                     # ./spec/acceptance/course_group_spec.rb:40:in `block (4 levels) in <top (required)>'

  2) Course Group 
     Loged in 
        In the new course group form 
            Create a new Group course with 3 subjects
                Failure/Error: course_groupDB.courses.count.should == 3
                           expected: 3
                                got: 0 (using ==)
                         # ./spec/acceptance/course_group_spec.rb:54:in `block (4 levels) in <top (required)>'
1)课程组
登录
以新课程组的形式
创建具有复杂名称的新团体课程
失败/错误:course\u groupDB.courses.count.should==1
预期:1
获取:0(使用==)
#./规格/验收/课程\小组\规格rb:40:in'block(4级)in'
2) 课程组
登录
以新课程组的形式
创建一个包含3个科目的新小组课程
失败/错误:course\u groupDB.courses.count.should==3
预期:3
获取:0(使用==)
#./规格/验收/课程\小组\规格rb:54:in‘分块(4级)’in’

我最终使用了Fuubar

它不能完全满足我的需要,但它是一个很好的开端