require File.dirname(__FILE__) + '/spec_helper.rb' describe MetricFu::Flay do describe "generate_html" do it "should create a new Generator and call generate_report on it" do @generator = MetricFu::Flay.new('other_dir') @generator.should_receive(:`).and_return("Matches found in :call (mass = 55)\n\tlib/metric_fu/flog_reporter.rb:2\n\tlib/metric_fu/flog_reporter.rb:3") @generator.generate_html end end describe "template_name" do it "should return the class name in lowercase" do flay = MetricFu::Flay.new('base_dir') flay.template_name.should == 'flay' end end end