Sha256: 13ea8d8828b1507cf0e817fe3a1c88bceb757a2bd324ffea5eb8ae4effec0c5a
Contents?: true
Size: 598 Bytes
Versions: 2
Compression:
Stored size: 598 Bytes
Contents
require "spec_helper" require "daily_weekly_monthly/downloader" describe DailyWeeklyMonthly::Downloader do describe "#call" do context "when the command fails" do subject { described_class.new "echo 'foo' && exit 1" } it "raises a runtime error" do expect { subject.call }.to raise_error RuntimeError, "Failed to download backup: foo\n" end end context "when the command succeeds" do subject { described_class.new "echo 'foo'" } it "returns the output of the command" do expect(subject.call).to eq "foo\n" end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
daily_weekly_monthly-0.0.4 | spec/daily_weekly_monthly/downloader_spec.rb |
daily_weekly_monthly-0.0.3 | spec/daily_weekly_monthly/downloader_spec.rb |