Sha256: 708cd8b3c9d39b6eaecf9c2d2ff0d1faaf45abf96f27e21263f180f6e2b44342
Contents?: true
Size: 848 Bytes
Versions: 40
Compression:
Stored size: 848 Bytes
Contents
require "tmpdir" require "librarian/error" require "librarian/action/ensure" module Librarian describe Action::Ensure do let(:env) { mock } let(:action) { described_class.new(env) } before do env.stub(:specfile_name) { "Specfile" } end describe "#run" do context "when the environment does not know its project path" do before { env.stub(:project_path) { nil } } it "should raise an error describing that the specfile is mising" do expect { action.run }.to raise_error(Error, "Cannot find Specfile!") end end context "when the environment knows its project path" do before { env.stub(:project_path) { Dir.tmpdir } } it "should not raise an error" do expect { action.run }.to_not raise_error end end end end end
Version data entries
40 entries across 40 versions & 4 rubygems