Permalink
Browse files

Merge pull request #211 from outdooricon/mocha_2.3.0

Upgrade to Mocha 2.3.0
  • Loading branch information...
2 parents d4636e7 + ed61e53 commit a44f0b519819b51d9c3deb053bf92675a010f068 @jfirebaugh committed Sep 2, 2015
@@ -12,7 +12,11 @@ window.onload = function () {
currentSuite = suite;
while (!(specFilePath = currentSuite.path)) {
- currentSuite = currentSuite.parent
+ if (currentSuite.parent) {
+ currentSuite = currentSuite.parent;
+ } else {
+ break;
+ }
}
specFilePath = /([^\.]*)/.exec(specFilePath)[1];
Submodule mocha updated 169 files
@@ -3,12 +3,6 @@ describe("failure", function(){
(2 + 2).should.equal(5);
});
- it("errors", function() {
- // Mocha catches and re-throws string exceptions, so we only need to test
- // throwing real Error objects.
- throw new Error("this one errors out");
- });
-
it("errors asynchronously", function(done) {
setTimeout(function() {
(2 + 2).should.equal(5);
@@ -14,12 +14,12 @@
subject{ page.find_link('A test suite') }
it 'should contain spec path and grep string' do
- subject['href'].should == "#{page.current_url}#{spec_file}?grep=#{URI.encode(suite_name)}"
+ subject['href'].should == "#{page.current_url}#{spec_file}/?grep=#{URI.encode(suite_name)}"
end
end
describe 'replay link (arrow icon)' do
- subject{ page.find(%Q{a[href="#{page.current_url}#{spec_file}?grep=#{URI.encode([suite_name, test_name].join(' '))}"]}) }
+ subject{ page.find(%Q{a[href="#{page.current_url}#{spec_file}/?grep=#{URI.encode([suite_name, test_name].join(' '))}"]}) }
it 'should contain spec path and grep string' do
subject.should_not be_nil
View
@@ -69,6 +69,7 @@
{'event' => 'fail',
'type' => 'test',
'data' => {
+ 'duration' => anything,
'title' => 'fails',
'fullTitle' => 'failure fails',
'parentFullTitle' => 'failure',
@@ -77,18 +78,6 @@
'error' => {'message' => 'expected 4 to equal 5', 'name' => 'AssertionError'}}}
end
- let(:error) do
- {'event' => 'fail',
- 'type' => 'test',
- 'data' => {
- 'title' => 'errors',
- 'fullTitle' => 'failure errors',
- 'parentFullTitle' => 'failure',
- 'status' => 'failed',
- 'path' => 'failing_spec.js',
- 'error' => {'message' => 'this one errors out', 'name' => 'Error'}}}
- end
-
let(:error_async) do
{'event' => 'fail',
'type' => 'test',
@@ -135,7 +124,6 @@
subject.reporter.should_receive(:process_mocha_event).with(suite_end)
subject.reporter.should_receive(:process_mocha_event).with(test)
subject.reporter.should_receive(:process_mocha_event).with(failure)
- subject.reporter.should_receive(:process_mocha_event).with(error)
subject.reporter.should_receive(:process_mocha_event).with(error_async)
subject.reporter.should_receive(:process_mocha_event).with(pass)
subject.reporter.should_receive(:process_mocha_event).with(pending)
Oops, something went wrong.

0 comments on commit a44f0b5

Please sign in to comment.