summaryrefslogtreecommitdiff
path: root/spec/bundler/commands/newgem_spec.rb
diff options
context:
space:
mode:
authorFrank Lam <ryzingsun11@yahoo.com>2020-05-28 15:21:04 +0800
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2020-06-18 19:14:15 +0900
commitb46895aa9313e407212d7071e6e073c40ef03c2e (patch)
tree83526da0bdc364be3564484e325f44c240716708 /spec/bundler/commands/newgem_spec.rb
parent3a2016b99424170c1dba9d73a8b313f39f4864b6 (diff)
[rubygems/rubygems] Extract shared example for absence of CI files
https://github.com/rubygems/rubygems/commit/22cb599bcc
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3212
Diffstat (limited to 'spec/bundler/commands/newgem_spec.rb')
-rw-r--r--spec/bundler/commands/newgem_spec.rb9
1 files changed, 9 insertions, 0 deletions
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}/)