Sha256: b0f5b3bf7057b6136d352d464bd07c1edf4b6d2b74b7368847de4585b61e93a0

Contents?: true

Size: 617 Bytes

Versions: 10

Compression:

Stored size: 617 Bytes

Contents

require 'spec_helper'

describe "ey" do
  context "run without arguments" do
    it "prints usage information" do
      expect(ey).to include("Usage:")
    end
  end

  context "run with an argument that is not a command" do
    it "tells the user that is not a command" do
      ey %w[foobarbaz], :expect_failure => true
      expect(@err).to include("Could not find command")
    end
  end

  context "run a command and a bad flag" do
    it "tells the user that is not a valid flag" do
      ey %w[help --expect-failure], :expect_failure => true
      expect(@err).to include("Unknown switches")
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
crazy-yard-3.2.2 spec/ey/ey_spec.rb
engineyard-3.2.5 spec/ey/ey_spec.rb
engineyard-3.2.4 spec/ey/ey_spec.rb
engineyard-3.2.3 spec/ey/ey_spec.rb
engineyard-4.0.0.pre3 spec/ey/ey_spec.rb
engineyard-4.0.0.pre2 spec/ey/ey_spec.rb
engineyard-4.0.0.pre1 spec/ey/ey_spec.rb
engineyard-3.2.1 spec/ey/ey_spec.rb
engineyard-3.2.0 spec/ey/ey_spec.rb
engineyard-3.1.3 spec/ey/ey_spec.rb