File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ class << self
44 def from_io ( program :, io : nil )
55 io ||= $stdin
66
7- raise InstallError , " io must respond to #read" unless io . respond_to? ( :read )
8- raise InstallError , " io is closed" if io . respond_to? ( :closed? ) && io . closed?
7+ raise InstallError , ' io must respond to #read' unless io . respond_to? ( :read )
8+ raise InstallError , ' io is closed' if io . respond_to? ( :closed? ) && io . closed?
99
1010 from_string program :, string : io . read
1111 end
@@ -23,7 +23,7 @@ def from_string(program:, string:)
2323 end
2424
2525 def create_tempfile
26- tempfile = Tempfile . new [ " completely-" , '.bash' ]
26+ tempfile = Tempfile . new [ ' completely-' , '.bash' ]
2727 tempfiles . push tempfile
2828 tempfile
2929 end
Original file line number Diff line number Diff line change 1414 end
1515
1616 describe '::from_io' do
17- let ( :io ) { StringIO . new 'dummy data' }
1817 subject { described_class . from_io program :, io : }
1918
19+ let ( :io ) { StringIO . new 'dummy data' }
20+
2021 it 'reads the script from io and writes it to a temp file' do
2122 expect ( File . read subject . script_path ) . to eq 'dummy data'
2223 end
2324 end
2425
2526 describe '::from_string' do
26- let ( :string ) { 'dummy data' }
2727 subject { described_class . from_string program :, string : }
2828
29+ let ( :string ) { 'dummy data' }
30+
2931 it 'reads the script from io and writes it to a temp file' do
3032 expect ( File . read subject . script_path ) . to eq 'dummy data'
3133 end
You can’t perform that action at this time.
0 commit comments