Skip to content

Commit

Permalink
[rubygems/rubygems] Remove shared examples for present test framework
Browse files Browse the repository at this point in the history
* `bundle gem` has new option to select CI provider

rubygems/rubygems@320f3546c1
  • Loading branch information
FTLam11 authored and hsbt committed Jun 18, 2020
1 parent 25ac5b3 commit 0d3c185
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions spec/bundler/commands/newgem_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,6 @@ def gem_skeleton_assertions
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}/)
end
end

shared_examples_for "test framework is absent" do
it "does not create any test framework files" do
expect(bundled_app("#{gem_name}/.rspec")).to_not exist
Expand Down Expand Up @@ -463,8 +457,6 @@ def create_temporary_dir(dir)
it "creates a default test which fails" do
expect(bundled_app("#{gem_name}/spec/#{require_path}_spec.rb").read).to include("expect(false).to eq(true)")
end

it_behaves_like "test framework is present"
end

context "gem.test setting set to rspec" do
Expand All @@ -478,8 +470,6 @@ def create_temporary_dir(dir)
expect(bundled_app("#{gem_name}/spec/#{require_path}_spec.rb")).to exist
expect(bundled_app("#{gem_name}/spec/spec_helper.rb")).to exist
end

it_behaves_like "test framework is present"
end

context "gem.test setting set to rspec and --test is set to minitest" do
Expand All @@ -492,8 +482,6 @@ def create_temporary_dir(dir)
expect(bundled_app("#{gem_name}/test/#{require_path}_test.rb")).to exist
expect(bundled_app("#{gem_name}/test/test_helper.rb")).to exist
end

it_behaves_like "test framework is present"
end

context "--test parameter set to minitest" do
Expand Down Expand Up @@ -526,8 +514,6 @@ def create_temporary_dir(dir)
it "creates a default test which fails" do
expect(bundled_app("#{gem_name}/test/#{require_path}_test.rb").read).to include("assert false")
end

it_behaves_like "test framework is present"
end

context "gem.test setting set to minitest" do
Expand All @@ -552,8 +538,6 @@ def create_temporary_dir(dir)

expect(bundled_app("#{gem_name}/Rakefile").read).to eq(rakefile)
end

it_behaves_like "test framework is present"
end

context "--test parameter set to test-unit" do
Expand Down Expand Up @@ -586,8 +570,6 @@ def create_temporary_dir(dir)
it "creates a default test which fails" do
expect(bundled_app("#{gem_name}/test/#{require_path}_test.rb").read).to include("assert_equal(\"expected\", \"actual\")")
end

it_behaves_like "test framework is present"
end

context "--ci with no arugment" do
Expand Down Expand Up @@ -700,8 +682,6 @@ def create_temporary_dir(dir)

expect(bundled_app("#{gem_name}/Rakefile").read).to eq(rakefile)
end

it_behaves_like "test framework is present"
end

context "gem.test set to rspec and --test with no arguments", :hint_text do
Expand All @@ -722,8 +702,6 @@ def create_temporary_dir(dir)
"This setting can be changed anytime with `bundle config gem.test`."
expect(out).to match(hint)
end

it_behaves_like "test framework is present"
end

context "gem.test setting set to false and --test with no arguments", :hint_text do
Expand Down

0 comments on commit 0d3c185

Please sign in to comment.