Sha256: 0ba7cea8a1c82aa1d4a8cc83a515cdb11a649c4782b71efccf6299d4e61f3093

Contents?: true

Size: 1.11 KB

Versions: 13

Compression:

Stored size: 1.11 KB

Contents

require 'spec/autotest/autotest_helper'

describe "failed_results_re" do
  it "should match a failure" do
    re = Autotest::Rspec.new.failed_results_re
    re =~ "1)\n'this example' FAILED\nreason\n/path.rb:37:\n\n"
    $1.should == "this example"
    $2.should == "reason\n/path.rb:37:"
  end

  it "should match a failure when matcher outputs multiple lines" do
    re = Autotest::Rspec.new.failed_results_re
    re =~ "1)\n'other example' FAILED\n\nreason line 1\nreason line 2\n\n(additional info)\n/path.rb:37:\n\n"
    $1.should == "other example"
    $2.should == "reason line 1\nreason line 2\n\n(additional info)\n/path.rb:37:"
  end

  it "should match an Error" do
    re = Autotest::Rspec.new.failed_results_re
    re =~ "1)\nRuntimeError in 'this example'\nreason\n/path.rb:37:\n\n"
    $1.should == "this example"
    $2.should == "reason\n/path.rb:37:"
  end

  it "should match an Error that doesn't end in Error" do
    re = Autotest::Rspec.new.failed_results_re
    re =~ "1)\nInvalidArgument in 'this example'\nreason\n/path.rb:37:\n\n"
    $1.should == "this example"
    $2.should == "reason\n/path.rb:37:"
  end
end

Version data entries

13 entries across 13 versions & 6 rubygems

Version Path
hubbub-0.0.11 lib/vendor/plugins/rspec/spec/autotest/failed_results_re_spec.rb
hubbub-0.0.10 lib/vendor/plugins/rspec/spec/autotest/failed_results_re_spec.rb
hubbub-0.0.9 lib/vendor/plugins/rspec/spec/autotest/failed_results_re_spec.rb
hubbub-0.0.8 lib/vendor/plugins/rspec/spec/autotest/failed_results_re_spec.rb
hubbub-0.0.6 lib/vendor/plugins/rspec/spec/autotest/failed_results_re_spec.rb
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/spec/autotest/failed_results_re_spec.rb
middleman-0.10.17 vendor/gems/gems/rspec-1.2.9/spec/autotest/failed_results_re_spec.rb
middleman-0.10.16 vendor/gems/gems/rspec-1.2.9/spec/autotest/failed_results_re_spec.rb
middleman-0.10.15 vendor/gems/gems/rspec-1.2.9/spec/autotest/failed_results_re_spec.rb
rackjour-0.1.8 vendor/gems/gems/rspec-1.2.9/spec/autotest/failed_results_re_spec.rb
middleman-0.10.14 vendor/gems/gems/rspec-1.2.9/spec/autotest/failed_results_re_spec.rb
ageweke-rspec-1.2.9 spec/autotest/failed_results_re_spec.rb
rspec-1.2.9 spec/autotest/failed_results_re_spec.rb