1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[rubygems/rubygems] Extract shared example for absence of CI files

https://github.com/rubygems/rubygems/commit/22cb599bcc
This commit is contained in:
Frank Lam 2020-05-28 15:21:04 +08:00 committed by Hiroshi SHIBATA
parent 3a2016b994
commit b46895aa93
Notes: git 2020-06-18 19:15:15 +09:00

View file

@ -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}/)