-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* resolve to microseconds * shouldn't happen in the real world, but .self.extract_metadata_and_tags supports extracting metadata and tags from empty metadata hash * test formatter precision * Bump rspec-abq to 1.1.3
- Loading branch information
1 parent
eba1f09
commit 37fd93f
Showing
14 changed files
with
53 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ GIT | |
PATH | ||
remote: .. | ||
specs: | ||
rspec-abq (1.1.2) | ||
rspec-abq (1.1.3) | ||
rspec-core (>= 3.5.0, < 3.13.0) | ||
|
||
GEM | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module RSpec | ||
module Abq | ||
# current version! | ||
VERSION = "1.1.2" | ||
VERSION = "1.1.3" | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
46 | ||
47 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe RSpec::Abq::Formatter do | ||
describe ".abq_result(example)" do | ||
it "reports times in microseconds", :aggregate_failures do # rubocop:disable RSpec/ExampleLength | ||
started_at_string = "2023-01-01T01:01:01.123456Z" | ||
started_at = Time.parse(started_at_string) | ||
runtime = 1.123456 | ||
finished_at = started_at + runtime | ||
execution_result = instance_double( | ||
RSpec::Core::Example::ExecutionResult, | ||
run_time: runtime, | ||
started_at: started_at, | ||
finished_at: finished_at, | ||
exception: nil, | ||
status: :passed | ||
) | ||
|
||
example = instance_double( | ||
RSpec::Core::Example, | ||
id: "./spec/foo_spec.rb:1", | ||
execution_result: execution_result, | ||
metadata: {} | ||
) | ||
|
||
result = RSpec::Abq::Formatter.abq_result(example)[:test_result] | ||
|
||
expect(result[:runtime]).to eq 1_123_456_000 | ||
expect(result[:started_at]).to eq(started_at_string) | ||
expect(result[:finished_at]).to eq(finished_at.utc.iso8601(6)) | ||
end | ||
end | ||
end |