This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ def group
30
30
it 'records example groups start time and description via id' do
31
31
expect {
32
32
profiler . example_group_started group_notification group
33
- } . to change { profiler . example_groups [ group ] } . to include (
34
- :start => now , :description => description
35
- )
33
+ } . to change { profiler . example_groups [ group ] } .
34
+ from ( a_hash_excluding ( :start , :description ) ) .
35
+ to ( a_hash_including ( :start => now , :description => description ) )
36
36
end
37
37
end
38
38
@@ -45,9 +45,9 @@ def group
45
45
it 'records example groups total time and description via id' do
46
46
expect {
47
47
profiler . example_group_finished group_notification group
48
- } . to change { profiler . example_groups [ group ] } . to include (
49
- :total_time => 1.0
50
- )
48
+ } . to change { profiler . example_groups [ group ] } .
49
+ from ( a_hash_excluding ( :total_time ) ) .
50
+ to ( a_hash_including ( :total_time => 1.0 ) )
51
51
end
52
52
end
53
53
Original file line number Diff line number Diff line change @@ -122,3 +122,4 @@ def failure_reason(example)
122
122
RSpec ::Matchers . define_negated_matcher :avoid_outputting , :output
123
123
RSpec ::Matchers . define_negated_matcher :exclude , :include
124
124
RSpec ::Matchers . define_negated_matcher :avoid_changing , :change
125
+ RSpec ::Matchers . define_negated_matcher :a_hash_excluding , :include
You can’t perform that action at this time.
0 commit comments