test/lib/rubycritic/turbulence_test.rb in rubycritic-0.0.14 vs test/lib/rubycritic/turbulence_test.rb in rubycritic-0.0.15

- old
+ new

@@ -1,13 +1,12 @@ require "test_helper" require "rubycritic/turbulence" -require "ostruct" 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.new(files).data + 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