Sha256: d2b0f2767bbfa11da36a30d9dafdab93b83b9fd2a0339a55e708e7b935ecbeb8

Contents?: true

Size: 834 Bytes

Versions: 6

Compression:

Stored size: 834 Bytes

Contents

require './lib/second_curtain/kaleidoscope_command'

describe KaleidoscopeCommand do
	it "should return a valid command from a valid line" do
		line = 'ksdiff "/first/path.png" "/second/path.png"'
		command = KaleidoscopeCommand.command_from_line line
		expect(command).not_to be_nil
		expect(command.before_path).to eq("/first/path.png")
		expect(command.after_path).to eq("/second/path.png")
		expect(command.fails).to be_falsey
	end

	it "should return nil from an invalid line" do
		line = 'this shouldn\'t work'
		command = KaleidoscopeCommand.command_from_line line
		expect(command).to be_nil
	end

	it "should initialize correctly" do
		command = KaleidoscopeCommand.new('before', 'after')
		expect(command.before_path).to eq("before")
		expect(command.after_path).to eq("after")
		expect(command.fails).to be_falsey
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
second_curtain-0.6.0 spec/second_shutter/kaleidoscope_command_spec.rb
second_curtain-0.5.0 spec/second_shutter/kaleidoscope_command_spec.rb
second_curtain-0.4.0 spec/second_shutter/kaleidoscope_command_spec.rb
second_curtain-0.3.0 spec/second_shutter/kaleidoscope_command_spec.rb
second_curtain-0.2.4 spec/second_shutter/kaleidoscope_command_spec.rb
second_curtain-0.2.3 spec/second_shutter/kaleidoscope_command_spec.rb