Example #1
0
package cmd_test

import (
	"os"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"
	amzs3 "launchpad.net/goamz/s3"

	fakeclient "s3cli/client/fakes"
	s3clicmd "s3cli/cmd"
)

var _ = Describe("getCmd", func() {
	var (
		client *fakeclient.FakeClient
		cmd    s3clicmd.Cmd
	)

	BeforeEach(func() {
		var err error

		client = &fakeclient.FakeClient{}
		factory := s3clicmd.NewFactory(client)

		cmd, err = factory.Create("put")
		Expect(err).ToNot(HaveOccurred())
	})

	Describe("Run", func() {
		Context("with enough arguments", func() {
			It("uploads blob", func() {
Example #2
0
package cmd_test

import (
	"os"

	. "github.com/onsi/ginkgo"
	. "github.com/onsi/gomega"

	fakeclient "s3cli/client/fakes"
	s3clicmd "s3cli/cmd"
)

var _ = Describe("getCmd", func() {
	var (
		client *fakeclient.FakeClient
		cmd    s3clicmd.Cmd
	)

	BeforeEach(func() {
		var err error

		client = &fakeclient.FakeClient{}
		factory := s3clicmd.NewFactory(client)

		cmd, err = factory.Create("get")
		Expect(err).ToNot(HaveOccurred())
	})

	Describe("Run", func() {
		Context("with enough arguments", func() {
			It("downloads blob", func() {