From b46895aa9313e407212d7071e6e073c40ef03c2e Mon Sep 17 00:00:00 2001 From: Frank Lam Date: Thu, 28 May 2020 15:21:04 +0800 Subject: [rubygems/rubygems] Extract shared example for absence of CI files https://github.com/rubygems/rubygems/commit/22cb599bcc --- spec/bundler/commands/newgem_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'spec/bundler/commands/newgem_spec.rb') diff --git a/spec/bundler/commands/newgem_spec.rb b/spec/bundler/commands/newgem_spec.rb index 769b2678b3..ca2d24526c 100644 --- a/spec/bundler/commands/newgem_spec.rb +++ b/spec/bundler/commands/newgem_spec.rb @@ -194,6 +194,15 @@ RSpec.describe "bundle gem" do end end + shared_examples_for "CI config is absent" do + it "does not create any CI files" do + expect(bundled_app("#{gem_name}/.github/workflows/main.yml")).to_not exist + expect(bundled_app("#{gem_name}/.travis.yml")).to_not exist + expect(bundled_app("#{gem_name}/.gitlab-ci.yml")).to_not exist + expect(bundled_app("#{gem_name}/.circleci/config.yml")).to_not exist + end + end + shared_examples_for "test framework is present" do it "creates a .travis.yml file to test the library against the current Ruby version on Travis CI" do expect(bundled_app("#{gem_name}/.travis.yml").read).to match(/- #{RUBY_VERSION}/) -- cgit v1.2.3