Skip to content

Commit

Permalink
Change context to be more accurate based on new lib
Browse files Browse the repository at this point in the history
  • Loading branch information
etagwerker committed Oct 3, 2024
1 parent 36fbb58 commit a176b4b
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions spec/rails_bump/checker/bundle_locally_check_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
{"cronex"=>">= 0.13.0", "fugit"=>"~> 1.8", "globalid"=>">= 1.0.1", "sidekiq"=>">= 6"}
end
let(:version) { "6.1.0" }
before do

before do
@checker = RailsBump::Checker::BundleLocallyCheck.new(
rails_version: version,
dependencies: deps
Expand All @@ -16,14 +16,14 @@

context "when version of Rails does not exist" do
let(:version) { "999.9.9" }
it "returns success => false" do

it "returns success => false" do
result = @checker.check

expect(result.success?).to be_falsey
end

it "returns output with useful details" do
it "returns output with useful details" do
msg = "Could not find gem 'rails (= 999.9.9)' in rubygems"

result = @checker.check
Expand All @@ -35,7 +35,7 @@
context "when version of Rails exists and it is compatible" do
it 'installs dependencies without errors' do
result = @checker.check

expect(result.success?).to be_truthy
end
end
Expand All @@ -45,24 +45,24 @@

it "installs dependencies without errors" do
result = @checker.check

expect(result.success?).to be_truthy
end
end

context "when dependencies are clearly incompatible" do
let(:deps) do
{"rails"=>">= 4.2.0"}
{"administrate"=>"0.1.0"}
end
it "returns success => false" do

it "returns success => false" do
result = @checker.check

expect(result.success?).to be_falsey
end

it "returns output with useful details" do
msg = "You cannot specify the same gem twice"
it "returns output with useful details" do
msg = "Could not find compatible versions"

result = @checker.check

Expand Down

0 comments on commit a176b4b

Please sign in to comment.