Skip to content

Commit 97aa68a

Browse files
committed
(ruby): Wrap the handler class in a module
This is needed for when we define the handler later
1 parent ae3cac0 commit 97aa68a

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lambda/ruby/lib/lambda_function.rb

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
class Handler
2-
def add(first, second)
3-
return first + second
1+
module Lambda
2+
class Handler
3+
def add(first, second)
4+
return first + second
5+
end
46
end
57
end
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
require 'rspec'
22
require 'lambda_function'
33

4-
RSpec.describe Handler do
4+
RSpec.describe Lambda do
55
describe "#add" do
66
it "adds two numbers together" do
7-
handler = Handler.new
8-
expect(handler.add(1,2)).to eq(3)
7+
handler =
8+
expect(Lambda::Handler.new.add(1,2)).to eq(3)
99
end
1010
end
1111
end

0 commit comments

Comments
 (0)