Sha256: 5e28789fcffbe9b4b4a542aa86c41a9fad9d4dabdb107c8d8bf63917ac75e9cb

Contents?: true

Size: 349 Bytes

Versions: 23

Compression:

Stored size: 349 Bytes

Contents

require_relative '../lib/text.rb'

describe Text do
	it "should be able to replace text in file" do
		FileUtils.mkdir('tmp') if(!File.exists?('tmp'))
		File.open('tmp/test.txt','w'){|f|
			f.write("test thing")
		}
		Text.replace_in_file('tmp/test.txt','thing','string')
		expect(IO.read('tmp/test.txt').include?('test string')).to eq(true)
	end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
dev_commands-0.0.55 spec/text_spec.rb
dev_commands-0.0.49 spec/text_spec.rb
dev_commands-0.0.48 spec/text_spec.rb
dev_commands-0.0.47 spec/text_spec.rb
dev_commands-0.0.46 spec/text_spec.rb
dev_commands-0.0.45 spec/text_spec.rb
dev_commands-0.0.44 spec/text_spec.rb
dev_commands-0.0.43 spec/text_spec.rb
dev_commands-0.0.42 spec/text_spec.rb
dev_commands-0.0.41 spec/text_spec.rb
dev_commands-0.0.40 spec/text_spec.rb
dev_commands-0.0.39 spec/text_spec.rb
dev_commands-0.0.38 spec/text_spec.rb
dev_commands-0.0.37 spec/text_spec.rb
dev_commands-0.0.36 spec/text_spec.rb
dev_commands-0.0.35 spec/text_spec.rb
dev_commands-0.0.34 spec/text_spec.rb
dev_commands-0.0.25 spec/text_spec.rb
dev_commands-0.0.24 spec/text_spec.rb
dev_commands-0.0.23 spec/text_spec.rb