Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

Commit e79b7be

Browse files
committed
Add #content_with_named_vars spec
1 parent d03c27b commit e79b7be

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

spec/core/data_file_spec.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,12 @@
1414
expect(subject.php_content).to_not match(/^<\?php.*\?>^/)
1515
end
1616
end
17+
18+
describe '#content_with_named_vars' do
19+
it 'returns the file contents with the specified string replacements' do
20+
allow(subject).to receive(:content).and_return('var $name = "$value";')
21+
content = subject.content_with_named_vars('$name' => 'foo', '$value' => 'bar')
22+
expect(content).to eq('var foo = "bar";')
23+
end
24+
end
1725
end

0 commit comments

Comments
 (0)