test/readme_test.rb in fauna-1.3.2 vs test/readme_test.rb in fauna-1.3.3

- old
+ new

@@ -1,20 +1,20 @@ require File.expand_path('../test_helper', __FILE__) class ReadmeTest < MiniTest::Unit::TestCase - def test_readme - code = "" + def test_readme # rubocop:disable Metrics/MethodLength + code = '' - sections = File.read(File.expand_path("../../README.md", __FILE__)).split("```") - sections.select do |text| + sections = File.read(File.expand_path('../../README.md', __FILE__)).split('```') + sections.select do |text| # rubocop:disable Style/Next if text =~ /^ruby/ next if text =~ /ActionController|logger/ text.gsub!('$fauna = Fauna::Connection.new(secret: server_key)', '$fauna = SERVER_CONNECTION') code << text[4..-1] end end - tmp = File.open("/tmp/fauna-ruby-readme-eval.rb", "w") + tmp = File.open('/tmp/fauna-ruby-readme-eval.rb', 'w') tmp.write(code) tmp.close begin load tmp.path