spec/lib/appsignal/cli_spec.rb in appsignal-2.1.0.beta.1 vs spec/lib/appsignal/cli_spec.rb in appsignal-2.1.0
- old
+ new
@@ -2,11 +2,11 @@
describe Appsignal::CLI do
let(:out_stream) { std_stream }
let(:output) { out_stream.read }
let(:cli) { Appsignal::CLI }
- before { Dir.stub(:pwd => project_fixture_path) }
+ before { allow(Dir).to receive(:pwd).and_return(project_fixture_path) }
it "should print the help with no arguments, -h and --help" do
[nil, "-h", "--help"].each do |arg|
expect do
capture_stdout(out_stream) do
@@ -44,10 +44,10 @@
"appsignal -h to see the help"
end
describe "diagnose" do
it "should call Appsignal::Diagnose.install" do
- Appsignal::CLI::Diagnose.should_receive(:run)
+ expect(Appsignal::CLI::Diagnose).to receive(:run)
cli.run([
"diagnose"
])
end