Sha256: 25ee8a681af1f05c64da2cd393e0c75585464902c804a332041e01904a44a118
Contents?: true
Size: 644 Bytes
Versions: 2
Compression:
Stored size: 644 Bytes
Contents
require "test_helper" require "rubycritic/report_generators/turbulence" describe Rubycritic::Turbulence do describe "#data" do it "returns json data that maps pathname, churn and complexity to name, x and y" do files = [AnalysedFileDouble.new(:pathname => "./foo.rb", :churn => 1, :complexity => 2)] turbulence_data = Rubycritic::Turbulence.data(files) instance_parsed_json = JSON.parse(turbulence_data).first instance_parsed_json["name"].must_equal "./foo.rb" instance_parsed_json["x"].must_equal 1 instance_parsed_json["y"].must_equal 2 end end end class AnalysedFileDouble < OpenStruct; end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rubycritic-1.0.2 | test/lib/rubycritic/report_generators/turbulence_test.rb |
rubycritic-1.0.1 | test/lib/rubycritic/report_generators/turbulence_test.rb |