Sha256: 3bdc3bad17c53a9e4bd5e61da1d039ccf49f42cd78aa0b9e0bfb30fc933fef5c

Contents?: true

Size: 749 Bytes

Versions: 5

Compression:

Stored size: 749 Bytes

Contents

require 'spec_helper'
require 'kata/version'

describe 'kata shell' do
  it "should exit with status 1" do
    system "ruby -I lib bin/kata 1> /dev/null"
    expect($?.exitstatus).to eq(1)
  end

  it "should display the version" do
    expect(%x{ruby -I lib bin/kata version}.chomp).to eq("kata #{Kata::VERSION}")
  end

  it "should run the kata" do
    File.open('test_sample.rb', 'w') do |file|
      file.write <<-EOF
        kata "My Test" do
        end
      EOF
    end

    expect(%x{ruby -I lib bin/kata take test_sample.rb}.chomp).to eq('My Test Kata')

    File.unlink 'test_sample.rb'
  end

  it "should display the usage message" do
    expect(%x{ruby -I lib bin/kata help}).to match(/NAME\n.*kata - Ruby kata management/)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kata-1.6.1 spec/kata_spec.rb
kata-1.6.0 spec/kata_spec.rb
kata-1.5.0 spec/kata_spec.rb
kata-1.4.1 spec/kata_spec.rb
kata-1.4.0 spec/kata_spec.rb