Skip to content

Commit

Permalink
feat(can_have_connected_steps): introduce #scalar?
Browse files Browse the repository at this point in the history
  • Loading branch information
marian13 committed Feb 16, 2024
1 parent 8f18538 commit 6ff4b38
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Entities
module Expressions
class Base
include Support::AbstractMethod
include Support::Copyable

##
# @return [void]
Expand Down Expand Up @@ -54,6 +55,13 @@ class Base
#
abstract_method :inspect

##
# @return [Boolean]
#
def scalar?
false
end

##
# @return [Boolean]
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
subject { described_class }

it { is_expected.to include_module(ConvenientService::Support::AbstractMethod) }
it { is_expected.to include_module(ConvenientService::Support::Copyable) }
end

example_group "instance methods" do
Expand All @@ -33,6 +34,12 @@
it { is_expected.to have_abstract_method(:inspect) }
end

describe "#scalar?" do
it "returns `false`" do
expect(expression.scalar?).to eq(false)
end
end

describe "#not?" do
it "returns `false`" do
expect(expression.not?).to eq(false)
Expand Down

0 comments on commit 6ff4b38

Please sign in to comment.