Skip to content
This repository
Browse code

Adding test to make sure we can parse ERB format if trimming dash is …

…used
  • Loading branch information...
commit 5cbe0fcf591a00625a712cc18b6870cfeaeb7845 1 parent 3874756
Gabor Garami authored
12  spec/rspec/core/configuration_options_spec.rb
@@ -378,6 +378,18 @@
378 378
       expect(parse_options[:formatters]).to eq([['local']])
379 379
     end
380 380
 
  381
+    it "parses options file correctly if erb code has trimming options" do
  382
+      File.open("./.rspec", "w") do |f|
  383
+        f << "<% if 1 == 1 -%>\n"
  384
+        f << "--format local\n"
  385
+        f << "<%- end %>\n"
  386
+      end
  387
+
  388
+      expect do
  389
+        expect(parse_options[:formatters]).to eq([['local']])
  390
+      end.to_not raise_error(SyntaxError)
  391
+    end
  392
+
381 393
     context "with custom options file" do
382 394
       it "ignores project and global options files" do
383 395
         File.open("./.rspec", "w") {|f| f << "--format project"}

0 notes on commit 5cbe0fc

Please sign in to comment.
Something went wrong with that request. Please try again.