Skip to content

Commit

Permalink
[rubygems/rubygems] Extract shared example for absence of CI files
Browse files Browse the repository at this point in the history
  • Loading branch information
FTLam11 authored and hsbt committed Jun 18, 2020
1 parent 3a2016b commit b46895a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions spec/bundler/commands/newgem_spec.rb
Expand Up @@ -194,6 +194,15 @@ def gem_skeleton_assertions
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}/)
Expand Down

0 comments on commit b46895a

Please sign in to comment.