Sha256: 6d238156e443c01af81858331d9feab25b783dd808bedab473143f903d1b958e

Contents?: true

Size: 747 Bytes

Versions: 17

Compression:

Stored size: 747 Bytes

Contents

require "spec_helper"

describe ORS::Command do

  subject { ORS::Command }

  context ".run" do

    it "should execute help when the command is help" do
      mock(ORS::Commands::Help).new { mock!.execute.subject }
      subject.run ["help"]
    end

    it "should execute help when no command is given" do
      mock(ORS::Commands::Help).new { mock!.execute.subject }
      subject.run []
    end

    it "should execute help when an unknown command is given" do
      mock(ORS::Commands::Help).new { mock!.execute.subject }
      subject.run ["as0d9fja0s9djf"]
    end

    it "should show the version when given version as a command" do
      mock(ORS::Command).puts("ORS v#{ORS::VERSION}")
      subject.run ["version"]
    end

  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ors-0.2.10 spec/ors/command_spec.rb
ors-0.2.9 spec/ors/command_spec.rb
ors-0.2.8 spec/ors/command_spec.rb
ors-0.2.7 spec/ors/command_spec.rb
ors-0.2.6 spec/ors/command_spec.rb
ors-0.2.5 spec/ors/command_spec.rb
ors-0.2.4 spec/ors/command_spec.rb
ors-0.2.3 spec/ors/command_spec.rb
ors-0.2.2 spec/ors/command_spec.rb
ors-0.2.1 spec/ors/command_spec.rb
ors-0.2.0 spec/ors/command_spec.rb
ors-0.1.8 spec/ors/command_spec.rb
ors-0.1.7 spec/ors/command_spec.rb
ors-0.1.5 spec/ors/command_spec.rb
ors-0.1.4 spec/ors/command_spec.rb
ors-0.1.3 spec/ors/command_spec.rb
ors-0.1.1 spec/ors/command_spec.rb