File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 4
4
module Matplotlib
5
5
::RSpec . describe Pyplot do
6
6
describe '.xkcd' do
7
- specify do
8
- expect { |b | Pyplot . xkcd ( &b ) } . to yield_control
9
- end
10
-
11
7
specify do
12
8
saved_font_family = Matplotlib . rcParams [ 'font.family' ]
13
9
saved_path_sketch = Matplotlib . rcParams [ 'path.sketch' ]
14
- Pyplot . xkcd ( scale : 42 , length : 43 , randomness : 44 ) do
15
- expect ( Matplotlib . rcParams [ 'font.family' ] ) . to include ( 'xkcd' )
16
- expect ( Matplotlib . rcParams [ 'path.sketch' ] ) . to eq ( PyCall . tuple ( 42 , 43 , 44 ) )
17
- end
10
+ expect { |b |
11
+ Pyplot . xkcd ( scale : 42 , length : 43 , randomness : 44 ) do
12
+ lambda ( &b ) . call
13
+ expect ( Matplotlib . rcParams [ 'font.family' ] ) . to include ( 'xkcd' )
14
+ expect ( Matplotlib . rcParams [ 'path.sketch' ] ) . to eq ( PyCall . tuple ( 42 , 43 , 44 ) )
15
+ end
16
+ } . to yield_control
18
17
expect ( Matplotlib . rcParams [ 'font.family' ] ) . to eq ( saved_font_family )
19
18
expect ( Matplotlib . rcParams [ 'path.sketch' ] ) . to eq ( saved_path_sketch )
20
19
end
You can’t perform that action at this time.
0 commit comments