Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Cleanup: Update bundle assertions #1193

Merged
merged 1 commit into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions test/generators/suspenders/accessibility_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,9 @@ class AccessibilityGeneratorTest < Rails::Generators::TestCase
end

test "installs gems with Bundler" do
Bundler.stubs(:with_unbundled_env).yields
generator.expects(:run).with("bundle install").once
output = run_generator

capture(:stdout) do
generator.add_capybara_gems
end
assert_match(/bundle install/, output)
end

test "generator has a description" do
Expand Down
7 changes: 2 additions & 5 deletions test/generators/suspenders/factories_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ class FactoriesGenerator::DefaultTest < Rails::Generators::TestCase

test "installs gem with Bundler" do
with_test_suite :minitest do
Bundler.stubs(:with_unbundled_env).yields
generator.expects(:run).with("bundle install").once
output = run_generator

capture(:stdout) do
generator.add_factory_bot
end
assert_match(/bundle install/, output)
end
end

Expand Down
7 changes: 2 additions & 5 deletions test/generators/suspenders/inline_svg_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ class InlinveSvgGeneratorTest < Rails::Generators::TestCase
end

test "installs gems with Bundler" do
Bundler.stubs(:with_unbundled_env).yields
generator.expects(:run).with("bundle install").once
output = run_generator

capture(:stdout) do
generator.add_inline_svg_gem
end
assert_match(/bundle install/, output)
end

test "generator has a description" do
Expand Down