diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-12-11 22:50:51 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-12-11 22:50:51 +0900 |
commit | 058cb07f5ba4704eb55974780855fd33daa86bb4 (patch) | |
tree | 93b9d29fcd995bbb0eeca14ce5d53f98b2d305b2 | |
parent | cd57761237b105893e632ebb5d729e6c9c21285d (diff) | |
download | bundler-058cb07f5ba4704eb55974780855fd33daa86bb4.tar.gz |
rubocop -a
-rw-r--r-- | spec/realworld/double_check_spec.rb | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/spec/realworld/double_check_spec.rb b/spec/realworld/double_check_spec.rb index 7adcc37933..0aa58b3de3 100644 --- a/spec/realworld/double_check_spec.rb +++ b/spec/realworld/double_check_spec.rb @@ -1,40 +1,42 @@ # frozen_string_literal: true RSpec.describe "double checking sources", :realworld => true do - it "finds already-installed gems" do - create_file("rails.gemspec", <<-RUBY) - Gem::Specification.new do |s| - s.name = "rails" - s.version = "5.1.4" - s.summary = "" - s.description = "" - s.author = "" - s.add_dependency "actionpack", "5.1.4" - end - RUBY + if RUBY_VERSION >= "2.2" # rails 5.x and rack 2.x only supports >= Ruby 2.2. + it "finds already-installed gems" do + create_file("rails.gemspec", <<-RUBY) + Gem::Specification.new do |s| + s.name = "rails" + s.version = "5.1.4" + s.summary = "" + s.description = "" + s.author = "" + s.add_dependency "actionpack", "5.1.4" + end + RUBY - create_file("actionpack.gemspec", <<-RUBY) - Gem::Specification.new do |s| - s.name = "actionpack" - s.version = "5.1.4" - s.summary = "" - s.description = "" - s.author = "" - s.add_dependency "rack", "~> 2.0.0" - end - RUBY + create_file("actionpack.gemspec", <<-RUBY) + Gem::Specification.new do |s| + s.name = "actionpack" + s.version = "5.1.4" + s.summary = "" + s.description = "" + s.author = "" + s.add_dependency "rack", "~> 2.0.0" + end + RUBY - cmd = <<-RUBY - require "bundler" - require #{File.expand_path("../../support/artifice/vcr.rb", __FILE__).dump} - require "bundler/inline" - gemfile(true) do - source "https://rubygems.org" - gem "rails", path: "." - end - RUBY + cmd = <<-RUBY + require "bundler" + require #{File.expand_path("../../support/artifice/vcr.rb", __FILE__).dump} + require "bundler/inline" + gemfile(true) do + source "https://rubygems.org" + gem "rails", path: "." + end + RUBY - ruby! cmd - ruby! cmd - end if RUBY_VERSION >= "2.2" # rails 5.x and rack 2.x only supports >= Ruby 2.2. + ruby! cmd + ruby! cmd + end + end end |