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 44module Matplotlib
55 ::RSpec . describe Pyplot do
66 describe '.xkcd' do
7- specify do
8- expect { |b | Pyplot . xkcd ( &b ) } . to yield_control
9- end
10-
117 specify do
128 saved_font_family = Matplotlib . rcParams [ 'font.family' ]
139 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
1817 expect ( Matplotlib . rcParams [ 'font.family' ] ) . to eq ( saved_font_family )
1918 expect ( Matplotlib . rcParams [ 'path.sketch' ] ) . to eq ( saved_path_sketch )
2019 end
You can’t perform that action at this time.
0 commit comments