Skip to content

Commit

Permalink
DRY up test behaviors
Browse files Browse the repository at this point in the history
  • Loading branch information
gjtorikian committed Sep 17, 2020
1 parent fc6b8d8 commit 2efc5f3
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions bundler/spec/update/gems/fund_spec.rb
Expand Up @@ -10,17 +10,9 @@
gem 'has_funding', '< 2.0'
G

bundle "config set #{config}" if config

bundle :install
end

shared_examples "a fund message outputter" do
it "should display fund message for updated gems" do
expect(out).to include("2 gems you directly depend on are looking for funding.")
end
end

context "when listed gem is updated" do
before do
gemfile <<-G
Expand All @@ -32,6 +24,8 @@
bundle :update, :all => true
end

it_behaves_like "a fund message outputter"
it "should display fund message for updated gems" do
expect(out).to include("2 gems you directly depend on are looking for funding.")
end
end
end

0 comments on commit 2efc5f3

Please sign in to comment.