Skip to content

Commit a92ba6b

Browse files
committed
Update spec for initializer reloading
1 parent 4311954 commit a92ba6b

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spec/custom_initializer_spec.rb

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@ def initialize(*args)
1313

1414
class Test::Baz < Test::Foo
1515
param :qux
16+
17+
def initialize(*args)
18+
super
19+
@qux += 1
20+
end
1621
end
1722
end
1823

1924
it "reloads the initializer" do
20-
baz = Test::Baz.new(2, 8)
25+
baz = Test::Baz.new(5, 5)
2126

22-
expect(baz.bar).to eq 6 # 2 * 3
23-
expect(baz.qux).to eq 8
27+
expect(baz.bar).to eq 15 # 5 * 3
28+
expect(baz.qux).to eq 6 # 5 + 1
2429
end
2530
end

0 commit comments

Comments
 (0)