spec/shelly/cli/main_spec.rb in shelly-0.0.20 vs spec/shelly/cli/main_spec.rb in shelly-0.0.21.pre

- old
+ new

@@ -21,15 +21,15 @@ describe "#help" do it "should display available commands" do expected = <<-OUT Tasks: - shelly add # Adds new cloud to Shelly Cloud + shelly add # Adds new application to Shelly Cloud shelly help [TASK] # Describe available tasks or one specific task shelly login [EMAIL] # Logs user in to Shelly Cloud shelly register [EMAIL] # Registers new user account on Shelly Cloud - shelly user <command> # Manages users using this cloud + shelly user <command> # Manages users using this app shelly version # Displays shelly version OUT out = IO.popen("bin/shelly").read.strip out.should == expected.strip end @@ -187,11 +187,11 @@ @main.login end end it "should display list of applications to which user has access" do - $stdout.should_receive(:puts).with("\e[32mYou have following clouds available:\e[0m") + $stdout.should_receive(:puts).with("\e[32mYou have following applications available:\e[0m") $stdout.should_receive(:puts).with(" abc") $stdout.should_receive(:puts).with(" fooo") fake_stdin(["megan@example.com", "secret"]) do @main.login end @@ -275,20 +275,20 @@ end end end it "should use code name provided by user" do - $stdout.should_receive(:print).with("Cloud code name (foo-production - default): ") + $stdout.should_receive(:print).with("Application code name (foo-production - default): ") @app.should_receive(:code_name=).with("mycodename") fake_stdin(["mycodename", ""]) do @main.add end end context "when user provided empty code name" do it "should use 'current_dirname-purpose' as default" do - $stdout.should_receive(:print).with("Cloud code name (foo-production - default): ") + $stdout.should_receive(:print).with("Application code name (foo-production - default): ") @app.should_receive(:code_name=).with("foo-production") fake_stdin(["", ""]) do @main.add end end @@ -329,10 +329,10 @@ it "should display validation errors if they are any" do response = {"message" => "Validation Failed", "errors" => [["code_name", "has been already taken"]]} exception = Shelly::Client::APIError.new(response.to_json) @app.should_receive(:create).and_raise(exception) $stdout.should_receive(:puts).with("\e[31mCode name has been already taken\e[0m") - $stdout.should_receive(:puts).with("\e[31mFix erros in the below command and type it again to create your cloud\e[0m") + $stdout.should_receive(:puts).with("\e[31mFix erros in the below command and type it again to create your application\e[0m") $stdout.should_receive(:puts).with("\e[31mshelly add --code-name=foo-production --databases=postgresql --domains=foo-production.shellyapp.com\e[0m") lambda { fake_stdin(["", ""]) do @main.add end