Skip to content

Commit

Permalink
Introduce the GroupRule concept
Browse files Browse the repository at this point in the history
This object is intended to be a signifier for a grouping of dependencies.

Merge with group rule
  • Loading branch information
landongrindheim committed Mar 6, 2023
1 parent a79c172 commit 6010c76
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
11 changes: 11 additions & 0 deletions common/lib/dependabot/group_rule.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

module Dependabot
class GroupRule
attr_reader :name

def initialize(name)
@name = name
end
end
end
14 changes: 14 additions & 0 deletions common/spec/dependabot/group_rule_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

require "dependabot/group_rule"

RSpec.describe Dependabot::GroupRule do
describe "#name" do
it "returns the name" do
my_group_rule_name = "Darren from work"
group_rule = described_class.new(my_group_rule_name)

expect(group_rule.name).to eq(my_group_rule_name)
end
end
end

0 comments on commit 6010c76

Please sign in to comment.