spec/spec/runner/option_parser_spec.rb in rspec-0.9.3 vs spec/spec/runner/option_parser_spec.rb in rspec-0.9.4

- old
+ new

@@ -110,9 +110,14 @@ options = parse(["--example", File.dirname(__FILE__) + '/examples.txt']) options.examples.should eql([ "Sir, if you were my husband, I would poison your drink.", "Madam, if you were my wife, I would drink it."]) end + + it "should read no examples if given an empty file" do + options = parse(["--example", File.dirname(__FILE__) + '/empty_file.txt']) + options.examples.should eql([]) + end it "should use html formatter when format is h" do options = parse(["--format", "h"]) options.formatters[0].class.should equal(Spec::Runner::Formatter::HtmlFormatter) end