Skip to content

Commit

Permalink
rename json to minijson and fulljson to json
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed May 4, 2016
1 parent 0974d63 commit 7c3145e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/inspec/rspec_json_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def format_example(example)

# Minimal JSON formatter for inspec. Only contains limited information about
# examples without any extras.
class InspecRspecJson < RSpec::Core::Formatters::JsonFormatter
class InspecRspecMiniJson < RSpec::Core::Formatters::JsonFormatter
RSpec::Core::Formatters.register self, :message, :dump_summary, :dump_profile, :stop, :close

def dump_summary(summary)
Expand Down Expand Up @@ -71,7 +71,7 @@ def format_example(example)
end
end

class InspecRspecFullJson < InspecRspecJson
class InspecRspecJson < InspecRspecMiniJson
RSpec::Core::Formatters.register self, :message, :dump_summary, :dump_profile, :stop, :close

def add_profile(profile)
Expand Down
6 changes: 3 additions & 3 deletions lib/inspec/runner_rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def example_group(*args, &block)
# @return [nil]
def add_profile(profile)
RSpec.configuration.formatters
.find_all { |c| c.is_a? InspecRspecFullJson }
.find_all { |c| c.is_a? InspecRspecJson }
.each do |fmt|
fmt.add_profile(profile)
end
Expand Down Expand Up @@ -82,9 +82,9 @@ def reset_tests
end

FORMATTERS = {
'json-min' => 'InspecRspecMinJson',
'json' => 'InspecRspecJson',
'fulljson' => 'InspecRspecFullJson',
'rspecjson' => 'InspecRspecVanilla',
'json-rspec' => 'InspecRspecVanilla',
}.freeze

# Configure the output formatter and stream to be used with RSpec.
Expand Down

0 comments on commit 7c3145e

Please sign in to comment.