Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…used
  • Loading branch information...
commit 5cbe0fcf591a00625a712cc18b6870cfeaeb7845 1 parent 3874756
@hron84 hron84 authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 spec/rspec/core/configuration_options_spec.rb
View
12 spec/rspec/core/configuration_options_spec.rb
@@ -378,6 +378,18 @@
expect(parse_options[:formatters]).to eq([['local']])
end
+ it "parses options file correctly if erb code has trimming options" do
+ File.open("./.rspec", "w") do |f|
+ f << "<% if 1 == 1 -%>\n"
+ f << "--format local\n"
+ f << "<%- end %>\n"
+ end
+
+ expect do
+ expect(parse_options[:formatters]).to eq([['local']])
+ end.to_not raise_error(SyntaxError)
+ end
+
context "with custom options file" do
it "ignores project and global options files" do
File.open("./.rspec", "w") {|f| f << "--format project"}
Please sign in to comment.
Something went wrong with that request. Please try again.