Sha256: e6b8baa9c1bb1d8b9734ab877974b1091bc635eb58e84da5063c3c22c0401acf
Contents?: true
Size: 1.07 KB
Versions: 6
Compression:
Stored size: 1.07 KB
Contents
# encoding: utf-8 describe "Rake::Task['check:fu:display']", :tasks do # The {#commands} variable is defined in the spec/support/config/tasks.rb # It collects the list of commands, that has been sent to system by # any instance of Hexx::RSpec::System utility. let(:metric) { Hexx::Suit::Metrics::MetricFu } let(:task) { Rake::Task["check:fu:display"] } describe ".invoke", :sandbox, :capture do let(:subject) { try_in_sandbox { task.invoke } } it "loads the metric" do expect(metric).to receive(:load) subject end context "without metric_fu.yml" do it "opens the metric" do expect { subject } .to change { commands } .to ["metric_fu --open --out tmp/metric_fu"] end end context "with metric_fu.yml" do let(:options) { { "output" => "custom" } } before { prepare_settings options, "config/metrics/metric_fu.yml" } it "uses custom output" do expect { subject } .to change { commands } .to ["metric_fu --open --out custom"] end end end end
Version data entries
6 entries across 6 versions & 1 rubygems