diff --git a/.rubocop.yml b/.rubocop.yml index f12289800a3..a75f1be66a9 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -64,6 +64,8 @@ Style/SignalException: Style/StringLiterals: EnforcedStyle: double_quotes + Exclude: + - lib/bundler/templates/* Style/StringLiteralsInInterpolation: EnforcedStyle: double_quotes diff --git a/lib/bundler/templates/Executable b/lib/bundler/templates/Executable index 414a75898d6..e5fb694ce46 100755 --- a/lib/bundler/templates/Executable +++ b/lib/bundler/templates/Executable @@ -1,4 +1,4 @@ -#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %> +#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG['ruby_install_name'] %> # frozen_string_literal: true # @@ -8,22 +8,22 @@ # this file is here to facilitate running it. # -require "pathname" -ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../<%= relative_gemfile_path %>", +require 'pathname' +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../<%= relative_gemfile_path %>', Pathname.new(__FILE__).realpath) -bundle_binstub = File.expand_path("../bundle", __FILE__) +bundle_binstub = File.expand_path('../bundle', __FILE__) if File.file?(bundle_binstub) if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/ load(bundle_binstub) else - abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. -Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.") + abort('Your `bin/bundle` was not generated by Bundler, so this binstub cannot run. +Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.') end end -require "rubygems" -require "bundler/setup" +require 'rubygems' +require 'bundler/setup' -load Gem.bin_path("<%= spec.name %>", "<%= executable %>") +load Gem.bin_path('<%= spec.name %>', '<%= executable %>') diff --git a/lib/bundler/templates/Executable.bundler b/lib/bundler/templates/Executable.bundler index eeda90b584b..de204d7c5e1 100644 --- a/lib/bundler/templates/Executable.bundler +++ b/lib/bundler/templates/Executable.bundler @@ -1,4 +1,4 @@ -#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %> +#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG['ruby_install_name'] %> # frozen_string_literal: true # @@ -8,7 +8,7 @@ # this file is here to facilitate running it. # -require "rubygems" +require 'rubygems' m = Module.new do module_function @@ -18,12 +18,12 @@ m = Module.new do end def env_var_version - ENV["BUNDLER_VERSION"] + ENV['BUNDLER_VERSION'] end def cli_arg_version return unless invoked_as_script? # don't want to hijack other binstubs - return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update` + return unless 'update'.start_with?(ARGV.first || ' ') # must be running `bundle update` bundler_version = nil update_index = nil ARGV.each_with_index do |a, i| @@ -31,23 +31,23 @@ m = Module.new do bundler_version = a end next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/ - bundler_version = $1 || ">= 0.a" + bundler_version = $1 || '>= 0.a' update_index = i end bundler_version end def gemfile - gemfile = ENV["BUNDLE_GEMFILE"] + gemfile = ENV['BUNDLE_GEMFILE'] return gemfile if gemfile && !gemfile.empty? - File.expand_path("../<%= relative_gemfile_path %>", __FILE__) + File.expand_path('../<%= relative_gemfile_path %>', __FILE__) end def lockfile lockfile = case File.basename(gemfile) - when "gems.rb" then gemfile.sub(/\.rb$/, gemfile) + when 'gems.rb' then gemfile.sub(/\.rb$/, gemfile) else "#{gemfile}.lock" end File.expand_path(lockfile) @@ -68,22 +68,22 @@ m = Module.new do end def load_bundler! - ENV["BUNDLE_GEMFILE"] ||= gemfile + ENV['BUNDLE_GEMFILE'] ||= gemfile # must dup string for RG < 1.8 compatibility activate_bundler(bundler_version.dup) end def activate_bundler(bundler_version) - if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0") - bundler_version = "< 2" + if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new('2.0') + bundler_version = '< 2' end gem_error = activation_error_handling do - gem "bundler", bundler_version + gem 'bundler', bundler_version end return if gem_error.nil? require_error = activation_error_handling do - require "bundler/version" + require 'bundler/version' end return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION)) warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`" @@ -101,5 +101,5 @@ end m.load_bundler! if m.invoked_as_script? - load Gem.bin_path("<%= spec.name %>", "<%= executable %>") + load Gem.bin_path('<%= spec.name %>', '<%= executable %>') end diff --git a/lib/bundler/templates/Executable.standalone b/lib/bundler/templates/Executable.standalone index 4bf0753f44d..c114afe3376 100644 --- a/lib/bundler/templates/Executable.standalone +++ b/lib/bundler/templates/Executable.standalone @@ -1,4 +1,4 @@ -#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG["ruby_install_name"] %> +#!/usr/bin/env <%= Bundler.settings[:shebang] || RbConfig::CONFIG['ruby_install_name'] %> # # This file was generated by Bundler. # @@ -6,9 +6,9 @@ # this file is here to facilitate running it. # -require "pathname" +require 'pathname' path = Pathname.new(__FILE__) -$:.unshift File.expand_path "../<%= standalone_path %>", path.realpath +$:.unshift File.expand_path '../<%= standalone_path %>', path.realpath -require "bundler/setup" -load File.expand_path "../<%= executable_path %>", path.realpath +require 'bundler/setup' +load File.expand_path '../<%= executable_path %>', path.realpath diff --git a/lib/bundler/templates/Gemfile b/lib/bundler/templates/Gemfile index 1afd2cce673..3e72af11862 100644 --- a/lib/bundler/templates/Gemfile +++ b/lib/bundler/templates/Gemfile @@ -1,7 +1,7 @@ # frozen_string_literal: true -source "https://rubygems.org" +source 'https://rubygems.org' git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } -# gem "rails" +# gem 'rails' diff --git a/lib/bundler/templates/gems.rb b/lib/bundler/templates/gems.rb index 547cd6e8d9b..3fe6725b83d 100644 --- a/lib/bundler/templates/gems.rb +++ b/lib/bundler/templates/gems.rb @@ -1,8 +1,8 @@ # frozen_string_literal: true # A sample gems.rb -source "https://rubygems.org" +source 'https://rubygems.org' git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } -# gem "rails" +# gem 'rails' diff --git a/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt b/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt index a3833d29d78..b87c1ae7676 100644 --- a/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt +++ b/lib/bundler/templates/newgem/CODE_OF_CONDUCT.md.tt @@ -23,7 +23,7 @@ include: Examples of unacceptable behavior by participants include: * The use of sexualized language or imagery and unwelcome sexual attention or -advances + advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or electronic @@ -67,8 +67,8 @@ members of the project's leadership. ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, -available at [http://contributor-covenant.org/version/1/4][version] +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at [http://contributor-covenant.org/version/1/4][version] [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ diff --git a/lib/bundler/templates/newgem/Gemfile.tt b/lib/bundler/templates/newgem/Gemfile.tt index c114bd66659..df90355fba6 100644 --- a/lib/bundler/templates/newgem/Gemfile.tt +++ b/lib/bundler/templates/newgem/Gemfile.tt @@ -1,4 +1,4 @@ -source "https://rubygems.org" +source 'https://rubygems.org' git_source(:github) {|repo_name| "https://github.com/#{repo_name}" } diff --git a/lib/bundler/templates/newgem/README.md.tt b/lib/bundler/templates/newgem/README.md.tt index 22ddeaa91a6..9661d9dfb33 100644 --- a/lib/bundler/templates/newgem/README.md.tt +++ b/lib/bundler/templates/newgem/README.md.tt @@ -1,6 +1,9 @@ # <%= config[:constant_name] %> -Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/<%= config[:namespaced_path] %>`. To experiment with that code, run `bin/console` for an interactive prompt. +Welcome to your new gem! In this directory, you'll find the files you need to be +able to package up your Ruby library into a gem. Put your Ruby code in the file +`lib/<%= config[:namespaced_path] %>`. +To experiment with that code, run `bin/console` for an interactive prompt. TODO: Delete this and the text above, and describe your gem @@ -26,22 +29,37 @@ TODO: Write usage instructions here ## Development -After checking out the repo, run `bin/setup` to install dependencies.<% if config[:test] %> Then, run `rake <%= config[:test].sub('mini', '').sub('rspec', 'spec') %>` to run the tests.<% end %> You can also run `bin/console` for an interactive prompt that will allow you to experiment.<% if config[:bin] %> Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %> +After checking out the repo, run `bin/setup` to install dependencies. +<% if config[:test] %>Then, run `rake <%= config[:test].sub('mini', '').sub('rspec', 'spec') %>` to run the tests.<% end %> +You can also run `bin/console` for an interactive prompt that will allow you to +experiment. +<% if config[:bin] %>Run `bundle exec <%= config[:name] %>` to use the gem in this directory, ignoring other installed copies of this gem.<% end %> -To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org). +To install this gem onto your local machine, run `bundle exec rake install`. To +release a new version, update the version number in `version.rb`, and then run +`bundle exec rake release`, which will create a Git tag for the version, push +Git commits and tags, and push the `.gem` file to +[rubygems.org](https://rubygems.org). ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/<%= config[:github_username] %>/<%= config[:name] %>.<% if config[:coc] %> This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.<% end %> +Bug reports and pull requests are welcome on GitHub at +https://github.com/<%= config[:github_username] %>/<%= config[:name] %>.<% if config[:coc] %> +This project is intended to be a safe, welcoming space for collaboration, and +contributors are expected to adhere to the +[Contributor Covenant](http://contributor-covenant.org) code of conduct.<% end %> <% if config[:mit] -%> ## License -The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). +The gem is available as open source under the terms of the +[MIT License](https://opensource.org/licenses/MIT). <% end -%> <% if config[:coc] -%> ## Code of Conduct -Everyone interacting in the <%= config[:constant_name] %> project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md). +Everyone interacting in the <%= config[:constant_name] %> project’s +codebases, issue trackers, chat rooms and mailing lists is expected to follow +the [code of conduct](https://github.com/<%= config[:github_username] %>/<%= config[:name] %>/blob/master/CODE_OF_CONDUCT.md). <% end -%> diff --git a/lib/bundler/templates/newgem/bin/console.tt b/lib/bundler/templates/newgem/bin/console.tt index a27f82430f9..c5c2545cb14 100644 --- a/lib/bundler/templates/newgem/bin/console.tt +++ b/lib/bundler/templates/newgem/bin/console.tt @@ -1,14 +1,14 @@ #!/usr/bin/env ruby -require "bundler/setup" -require "<%= config[:namespaced_path] %>" +require 'bundler/setup' +require '<%= config[:namespaced_path] %>' # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. # (If you use this, don't forget to add pry to your Gemfile!) -# require "pry" +# require 'pry' # Pry.start -require "irb" +require 'irb' IRB.start(__FILE__) diff --git a/lib/bundler/templates/newgem/exe/newgem.tt b/lib/bundler/templates/newgem/exe/newgem.tt index a8339bb79f5..a0052988155 100644 --- a/lib/bundler/templates/newgem/exe/newgem.tt +++ b/lib/bundler/templates/newgem/exe/newgem.tt @@ -1,3 +1,3 @@ #!/usr/bin/env ruby -require "<%= config[:namespaced_path] %>" +require '<%= config[:namespaced_path] %>' diff --git a/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt b/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt index 8cfc828f94f..c25ffaa6863 100644 --- a/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt +++ b/lib/bundler/templates/newgem/ext/newgem/extconf.rb.tt @@ -1,3 +1,3 @@ -require "mkmf" +require 'mkmf' create_makefile(<%= config[:makefile_path].inspect %>) diff --git a/lib/bundler/templates/newgem/lib/newgem.rb.tt b/lib/bundler/templates/newgem/lib/newgem.rb.tt index f441eab5f26..bd7819c1d9c 100644 --- a/lib/bundler/templates/newgem/lib/newgem.rb.tt +++ b/lib/bundler/templates/newgem/lib/newgem.rb.tt @@ -1,6 +1,6 @@ -require "<%= config[:namespaced_path] %>/version" +require '<%= config[:namespaced_path] %>/version' <%- if config[:ext] -%> -require "<%= config[:namespaced_path] %>/<%= config[:underscored_name] %>" +require '<%= config[:namespaced_path] %>/<%= config[:underscored_name] %>' <%- end -%> <%- config[:constant_array].each_with_index do |c, i| -%> diff --git a/lib/bundler/templates/newgem/newgem.gemspec.tt b/lib/bundler/templates/newgem/newgem.gemspec.tt index 97da2b14d81..ff54f3dabf9 100644 --- a/lib/bundler/templates/newgem/newgem.gemspec.tt +++ b/lib/bundler/templates/newgem/newgem.gemspec.tt @@ -2,9 +2,9 @@ # coding: utf-8 <%- end -%> -lib = File.expand_path("../lib", __FILE__) +lib = File.expand_path('../lib', __FILE__) $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) -require "<%= config[:namespaced_path] %>/version" +require '<%= config[:namespaced_path] %>/version' Gem::Specification.new do |spec| spec.name = <%= config[:name].inspect %> @@ -16,34 +16,35 @@ Gem::Specification.new do |spec| spec.description = %q{TODO: Write a longer description or delete this line.} spec.homepage = "TODO: Put your gem's website or public repo URL here." <%- if config[:mit] -%> - spec.license = "MIT" + spec.license = 'MIT' <%- end -%> - # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host' - # to allow pushing to a single host or delete this section to allow pushing to any host. + # Prevent pushing this gem to RubyGems.org. To allow pushes either set the + # 'allowed_push_host' to allow pushing to a single host or delete this section + # to allow pushing to any host. if spec.respond_to?(:metadata) spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'" else - raise "RubyGems 2.0 or newer is required to protect against " \ - "public gem pushes." + raise 'RubyGems 2.0 or newer is required to protect against ' \ + 'public gem pushes.' end spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } end - spec.bindir = "exe" + spec.bindir = 'exe' spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.require_paths = ["lib"] + spec.require_paths = ['lib'] <%- if config[:ext] -%> spec.extensions = ["ext/<%= config[:underscored_name] %>/extconf.rb"] <%- end -%> - spec.add_development_dependency "bundler", "~> <%= config[:bundler_version] %>" - spec.add_development_dependency "rake", "~> 10.0" + spec.add_development_dependency 'bundler', '~> <%= config[:bundler_version] %>' + spec.add_development_dependency 'rake', '~> 10.0' <%- if config[:ext] -%> - spec.add_development_dependency "rake-compiler" + spec.add_development_dependency 'rake-compiler' <%- end -%> <%- if config[:test] -%> - spec.add_development_dependency "<%= config[:test] %>", "~> <%= config[:test_framework_version] %>" + spec.add_development_dependency '<%= config[:test] %>', '~> <%= config[:test_framework_version] %>' <%- end -%> end diff --git a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt index c63b4878306..61118067587 100644 --- a/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt +++ b/lib/bundler/templates/newgem/spec/newgem_spec.rb.tt @@ -1,9 +1,9 @@ RSpec.describe <%= config[:constant_name] %> do - it "has a version number" do + it 'has a version number' do expect(<%= config[:constant_name] %>::VERSION).not_to be nil end - it "does something useful" do + it 'does something useful' do expect(false).to eq(true) end end diff --git a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt index 805cf57e011..8377cd3ffb1 100644 --- a/lib/bundler/templates/newgem/spec/spec_helper.rb.tt +++ b/lib/bundler/templates/newgem/spec/spec_helper.rb.tt @@ -1,9 +1,9 @@ -require "bundler/setup" -require "<%= config[:namespaced_path] %>" +require 'bundler/setup' +require '<%= config[:namespaced_path] %>' RSpec.configure do |config| # Enable flags like --only-failures and --next-failure - config.example_status_persistence_file_path = ".rspec_status" + config.example_status_persistence_file_path = '.rspec_status' # Disable RSpec exposing methods globally on `Module` and `main` config.disable_monkey_patching! diff --git a/lib/bundler/templates/newgem/test/newgem_test.rb.tt b/lib/bundler/templates/newgem/test/newgem_test.rb.tt index f2af9f90e0b..95e33a34ea0 100644 --- a/lib/bundler/templates/newgem/test/newgem_test.rb.tt +++ b/lib/bundler/templates/newgem/test/newgem_test.rb.tt @@ -1,4 +1,4 @@ -require "test_helper" +require 'test_helper' class <%= config[:constant_name] %>Test < Minitest::Test def test_that_it_has_a_version_number diff --git a/lib/bundler/templates/newgem/test/test_helper.rb.tt b/lib/bundler/templates/newgem/test/test_helper.rb.tt index 725e3e46473..49a56c18000 100644 --- a/lib/bundler/templates/newgem/test/test_helper.rb.tt +++ b/lib/bundler/templates/newgem/test/test_helper.rb.tt @@ -1,4 +1,4 @@ -$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__) -require "<%= config[:namespaced_path] %>" +$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__) +require '<%= config[:namespaced_path] %>' -require "minitest/autorun" +require 'minitest/autorun' diff --git a/spec/commands/install_spec.rb b/spec/commands/install_spec.rb index 4cb8584633c..303d976096e 100644 --- a/spec/commands/install_spec.rb +++ b/spec/commands/install_spec.rb @@ -515,7 +515,7 @@ it "includes the standalone path" do bundle! "binstubs rack", :standalone => true standalone_line = File.read(bundled_app("bin/rackup")).each_line.find {|line| line.include? "$:.unshift" }.strip - expect(standalone_line).to eq %($:.unshift File.expand_path "../../bundle", path.realpath) + expect(standalone_line).to eq %($:.unshift File.expand_path '../../bundle', path.realpath) end end diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index f4642787cbf..e8e12acd607 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -307,7 +307,7 @@ def create_temporary_dir(dir) end it "requires the version file" do - expect(bundled_app("test_gem/lib/test_gem.rb").read).to match(%r{require "test_gem/version"}) + expect(bundled_app("test_gem/lib/test_gem.rb").read).to match(%r{require 'test_gem/version'}) end it "creates a base error class" do @@ -344,7 +344,7 @@ def create_temporary_dir(dir) end it "requires 'test-gem'" do - expect(bundled_app("test_gem/exe/test_gem").read).to match(/require "test_gem"/) + expect(bundled_app("test_gem/exe/test_gem").read).to match(/require 'test_gem'/) end end @@ -360,7 +360,7 @@ def create_temporary_dir(dir) end it "requires 'test-gem'" do - expect(bundled_app("test_gem/exe/test_gem").read).to match(/require "test_gem"/) + expect(bundled_app("test_gem/exe/test_gem").read).to match(/require 'test_gem'/) end end @@ -400,7 +400,7 @@ def create_temporary_dir(dir) end it "requires 'test-gem'" do - expect(bundled_app("test_gem/spec/spec_helper.rb").read).to include(%(require "test_gem")) + expect(bundled_app("test_gem/spec/spec_helper.rb").read).to include(%(require 'test_gem')) end it "creates a default test which fails" do @@ -456,11 +456,11 @@ def create_temporary_dir(dir) end it "requires 'test-gem'" do - expect(bundled_app("test_gem/test/test_helper.rb").read).to include(%(require "test_gem")) + expect(bundled_app("test_gem/test/test_helper.rb").read).to include(%(require 'test_gem')) end it "requires 'minitest_helper'" do - expect(bundled_app("test_gem/test/test_gem_test.rb").read).to include(%(require "test_helper")) + expect(bundled_app("test_gem/test/test_gem_test.rb").read).to include(%(require 'test_helper')) end it "creates a default test which fails" do @@ -596,7 +596,7 @@ def create_temporary_dir(dir) end it "requires the version file" do - expect(bundled_app("test-gem/lib/test/gem.rb").read).to match(%r{require "test/gem/version"}) + expect(bundled_app("test-gem/lib/test/gem.rb").read).to match(%r{require 'test/gem/version'}) end it "runs rake without problems" do @@ -629,7 +629,7 @@ def create_temporary_dir(dir) end it "requires 'test/gem'" do - expect(bundled_app("test-gem/exe/test-gem").read).to match(%r{require "test/gem"}) + expect(bundled_app("test-gem/exe/test-gem").read).to match(%r{require 'test/gem'}) end end @@ -663,7 +663,7 @@ def create_temporary_dir(dir) end it "requires 'test/gem'" do - expect(bundled_app("test-gem/spec/spec_helper.rb").read).to include(%(require "test/gem")) + expect(bundled_app("test-gem/spec/spec_helper.rb").read).to include(%(require 'test/gem')) end it "creates a default test which fails" do @@ -697,11 +697,11 @@ def create_temporary_dir(dir) end it "requires 'test/gem'" do - expect(bundled_app("test-gem/test/test_helper.rb").read).to match(%r{require "test/gem"}) + expect(bundled_app("test-gem/test/test_helper.rb").read).to match(%r{require 'test/gem'}) end it "requires 'test_helper'" do - expect(bundled_app("test-gem/test/test/gem_test.rb").read).to match(/require "test_helper"/) + expect(bundled_app("test-gem/test/test/gem_test.rb").read).to match(/require 'test_helper'/) end it "creates a default test which fails" do @@ -753,7 +753,7 @@ def create_temporary_dir(dir) end it "includes rake-compiler" do - expect(bundled_app("test_gem/test_gem.gemspec").read).to include('spec.add_development_dependency "rake-compiler"') + expect(bundled_app("test_gem/test_gem.gemspec").read).to include("spec.add_development_dependency 'rake-compiler'") end it "depends on compile task for build" do @@ -859,7 +859,7 @@ def create_temporary_dir(dir) RAKEFILE expect(bundled_app("foobar/Rakefile").read).to eq(rakefile) - expect(bundled_app("foobar/foobar.gemspec").read).to include('spec.add_development_dependency "rspec"') + expect(bundled_app("foobar/foobar.gemspec").read).to include("spec.add_development_dependency 'rspec'") end it "asks about MIT license" do