This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
spec/rspec/core/formatters Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,6 @@ def profile *groups
31
31
it "prints the percentage taken from the total runtime" do
32
32
expect ( formatter_output . string ) . to match ( /, 100.0% of total time\) :/ )
33
33
end
34
-
35
- it "doesn't profile a single example group" do
36
- expect ( formatter_output . string ) . not_to match ( /slowest example groups/ )
37
- end
38
34
end
39
35
40
36
context "with one example group" do
@@ -51,6 +47,10 @@ def profile *groups
51
47
end
52
48
53
49
it_should_behave_like "profiles examples"
50
+
51
+ it "doesn't profile a single example group" do
52
+ expect ( formatter_output . string ) . not_to match ( /slowest example groups/ )
53
+ end
54
54
end
55
55
56
56
context "with multiple example groups" do
@@ -62,7 +62,7 @@ def profile *groups
62
62
# make it look slow without actually taking up precious time
63
63
example . clock = example_clock
64
64
end
65
- example_line_number = __LINE__ - 4
65
+ example_line_number = __LINE__ - 4
66
66
end
67
67
group2 = RSpec . describe ( "fast group" ) do
68
68
example ( "example 1" ) { }
@@ -71,6 +71,8 @@ def profile *groups
71
71
profile group1 , group2
72
72
end
73
73
74
+ it_should_behave_like "profiles examples"
75
+
74
76
it "prints the slowest example groups" do
75
77
expect ( formatter_output . string ) . to match ( /slowest example groups/ )
76
78
end
You can’t perform that action at this time.
0 commit comments