mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Implement Java naming
This commit is contained in:
parent
93368503e6
commit
3fbe6a2760
2 changed files with 13 additions and 3 deletions
|
@ -28,7 +28,12 @@ module Spectator::Formatting
|
|||
|
||||
# Java-ified class name created from the spec.
|
||||
private def classname
|
||||
"TODO"
|
||||
path = result.example.source.path
|
||||
file = File.basename(path)
|
||||
ext = File.extname(file)
|
||||
name = file[0...-(ext.size)]
|
||||
dir = path[0...-(file.size + 1)]
|
||||
{dir.gsub('/', '.').underscore, name.camelcase}.join('.')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -32,12 +32,17 @@ module Spectator::Formatting
|
|||
|
||||
# Java-ified name of the test suite.
|
||||
private def name
|
||||
"TODO"
|
||||
file = File.basename(@path)
|
||||
ext = File.extname(file)
|
||||
name = file[0...-(ext.size)]
|
||||
name.camelcase
|
||||
end
|
||||
|
||||
# Java-ified package (path) of the test suite.
|
||||
private def package
|
||||
"TODO"
|
||||
file = File.basename(@path)
|
||||
dir = @path[0...-(file.size + 1)]
|
||||
dir.gsub('/', '.').underscore
|
||||
end
|
||||
|
||||
# Selector for creating a JUnit test case based on a result.
|
||||
|
|
Loading…
Reference in a new issue