Sha256: acc083ffaced37b44066e28e7777681838a066203132d50cc8e3f5c1128b74a4
Contents?: true
Size: 1.16 KB
Versions: 4
Compression:
Stored size: 1.16 KB
Contents
require "spec_helper" MetricFu.metrics_require { 'rails_best_practices/generator' } describe RailsBestPracticesGenerator do break if metric_not_activated?(:rails_best_practices) describe "emit method" do let(:analyzer) { ::RailsBestPractices::Analyzer.new('.', { 'silent' => true }) } context "RailsBestPractices provides the expected API" do it { expect(analyzer).to respond_to :analyze } it { expect(analyzer).to respond_to :errors } end end describe "analyze method" do let(:error) { ::RailsBestPractices::Core::Error.new } context "RailsBestPractices provdies the expected API" do it { expect(error).to respond_to :filename } it { expect(error).to respond_to :line_number } it { expect(error).to respond_to :message } it { expect(error).to respond_to :url } end end describe "to_h method" do it "should put things into a hash" do MetricFu::Configuration.run {} practices = MetricFu::RailsBestPracticesGenerator.new practices.instance_variable_set(:@rails_best_practices_results, "the_practices") expect(practices.to_h[:rails_best_practices]).to eq("the_practices") end end end
Version data entries
4 entries across 4 versions & 1 rubygems