Created
May 20, 2014 22:16
-
-
Save shigeya/82b6279a41cd362c8422 to your computer and use it in GitHub Desktop.
Diff to make RubyMine 6.3.2's rspec3 support to compatible with RSpec 3.0.0rc1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- rspec3_formatter.rb.FCS 2014-05-21 07:14:30.000000000 +0900 | |
+++ rspec3_formatter.rb 2014-05-21 07:15:17.000000000 +0900 | |
@@ -132,7 +132,7 @@ | |
# Start capturing... | |
std_files = capture_output_start_external | |
- started_at_ms = get_time_in_ms(example.execution_result[:started_at]) | |
+ started_at_ms = get_time_in_ms(example.execution_result.started_at) | |
debug_log('Output capturing started.') | |
@@ -196,7 +196,7 @@ | |
def example_pending(example_notification) | |
example = example_notification.example | |
- message = example.execution_result[:pending_message] | |
+ message = example.execution_result.pending_message | |
debug_log("pending: #{example_description(example)}, #{message}, #{example}") | |
# stop capturing | |
@@ -246,9 +246,10 @@ | |
debug_log(status_message) | |
log(status_message) | |
- #Really must be '@count_notification == count_notification', it is hack for spec trunk tests | |
- if !@setup_failed && @count_notification > count_notification | |
- msg = "#{RUNNER_ISNT_COMPATIBLE_MESSAGE}Error: Not all examples have been run! (#{count_notification} of #{@count_notification})¥n#{gather_unfinished_examples_name}" | |
+ c_notification = example_count+failure_count+pending_count | |
+ #Really must be '@count_notification == c_notification', it is hack for spec trunk tests | |
+ if !@setup_failed && @count_notification && @count_notification > c_notification | |
+ msg = "#{RUNNER_ISNT_COMPATIBLE_MESSAGE}Error: Not all examples have been run! (#{c_notification} of #{@count_notification})¥n#{gather_unfinished_examples_name}" | |
log_and_raise_internal_error msg | |
debug_log(msg) | |
@@ -330,14 +331,14 @@ | |
def close_test_block(example) | |
example_data = remove_data_from_storage(example) | |
- finished_at_ms = get_time_in_ms(example.execution_result[:finished_at]) | |
+ finished_at_ms = get_time_in_ms(example.execution_result.finished_at) | |
duration = finished_at_ms - example_data.start_time_in_ms | |
additional_flowid_suffix = example_data.additional_flowid_suffix | |
running_example_full_name = example_data.full_name | |
debug_log("Example finishing... full example name = [#{running_example_full_name}], duration = #{duration} ms, additional flowid suffix=[#{additional_flowid_suffix}]") | |
- diagnostic_info = "rspec [#{::RSpec::Core::Version::STRING}]" + ", f/s=(#{finished_at_ms}, #{example_data.start_time_in_ms}), duration=#{duration}, time.now=#{Time.now.to_s}, raw[:started_at]=#{example.execution_result[:started_at].to_s}, raw[:finished_at]=#{example.execution_result[:finished_at].to_s}, raw[:run_time]=#{example.execution_result[:run_time].to_s}" | |
+ diagnostic_info = "rspec [#{::RSpec::Core::Version::STRING}]" + ", f/s=(#{finished_at_ms}, #{example_data.start_time_in_ms}), duration=#{duration}, time.now=#{Time.now.to_s}, raw[:started_at]=#{example.execution_result.started_at.to_s}, raw[:finished_at]=#{example.execution_result.finished_at.to_s}, raw[:run_time]=#{example.execution_result.run_time.to_s}" | |
log(@message_factory.create_test_finished(running_example_full_name, duration, ::Rake::TeamCity.is_in_buildserver_mode ? nil : diagnostic_info)) | |
end | |
@@ -450,4 +451,3 @@ | |
end | |
end | |
end | |
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm... still doesn't run them all for me. I seems to run a few of the, and then some of them just never complete, eg. 'Following examples weren't finished:'