Permalink
Browse files

Fixed warnings and printing messages on stdout in specs

  • Loading branch information...
1 parent 7f8416b commit fd467f79df2454cf17d7fa9a853cdeb175c0ca0d @wijet wijet committed Apr 6, 2012
Showing with 5 additions and 1 deletion.
  1. +3 −0 spec/shelly/cli/backup_spec.rb
  2. +2 −1 spec/shelly/cli/main_spec.rb
@@ -21,6 +21,7 @@
FileUtils.mkdir_p("/projects/foo")
Dir.chdir("/projects/foo")
File.open("Cloudfile", 'w') { |f| f.write("foo-staging:\n") }
+ $stdout.stub(:puts)
end
it "should ensure user has logged in" do
@@ -120,6 +121,7 @@
FileUtils.mkdir_p("/projects/foo")
Dir.chdir("/projects/foo")
File.open("Cloudfile", 'w') {|f| f.write("foo-staging:\n") }
+ $stdout.stub(:puts)
end
it "should ensure user has logged in" do
@@ -161,6 +163,7 @@
@client.stub(:database_backup).and_return({"filename" => "better.tar.gz", "size" => 12345, "kind" => "postgre"})
@client.stub(:restore_backup).and_return({"filename" => "better.tar.gz", "size" => 12345, "kind" => "postgre"})
$stdout.stub(:puts)
+ $stdout.stub(:print)
end
it "should ensure user has logged in" do
@@ -740,7 +740,8 @@ def raise_conflict(options = {})
describe "#ip" do
before do
- File.open("Cloudfile", 'w') {|f| f.write("foo-production:\n") }
+ File.open("Cloudfile", 'w') { |f| f.write("foo-production:\n") }
+ @app = Shelly::App.new("foo-staging")
@main.stub(:logged_in?).and_return(true)
end

0 comments on commit fd467f7

Please sign in to comment.