Skip to content

Commit e8212ed

Browse files
committed
fix specs for older ruby
1 parent 4f608de commit e8212ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/bashly/library/base_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
context "when #content is a string representing a lib/file" do
1818
subject do
19-
Class.new(described_class) { def content = "colors.sh" }.new
19+
Class.new(described_class) { def content; "colors.sh"; end }.new
2020
end
2121

2222
it "returns an array of hashes" do
@@ -54,7 +54,7 @@
5454

5555
context "when #content is a hash" do
5656
subject do
57-
Class.new(described_class) { def content = { some: 'hash' } }.new
57+
Class.new(described_class) { def content; { some: 'hash' }; end }.new
5858
end
5959

6060
it "returns an array with the hash as its first and only element" do
@@ -66,7 +66,7 @@
6666

6767
context "when #content is something else" do
6868
subject do
69-
Class.new(described_class) { def content = ["something else"] }.new
69+
Class.new(described_class) { def content; ["something else"]; end }.new
7070
end
7171

7272
it "returns it as is" do

0 commit comments

Comments
 (0)