Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions lib/mina/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ class Runner

def initialize(commands, backend)
fail 'You must specify execution mode' if execution_mode.nil?
fail 'Unsuported execution mode (pretty on windows)' if unsuported_execution_mode?

@backend = backend
@commands = commands
Expand All @@ -33,10 +32,6 @@ def script
Mina::Backend.const_get(class_name_for(backend)).new(commands).prepare
end

def unsuported_execution_mode?
execution_mode == :pretty && Gem::Platform.local.os == :windows
end

def class_name_for(symbol)
symbol.to_s.split('_').map(&:capitalize).join
end
Expand Down
6 changes: 0 additions & 6 deletions spec/lib/mina/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@
expect { described_class.new(nil, nil) }.to raise_error('You must specify execution mode')
end

it 'raises an error when run on windows and pretty print' do
instance.set(:execution_mode, :pretty)
allow(Gem::Platform.local).to receive(:os).and_return(:windows)
expect { described_class.new(nil, nil) }.to raise_error('Unsuported execution mode (pretty on windows)')
end

it 'sets execution mode to printer if simulate is true' do
instance.set(:execution_mode, :pretty)
instance.set(:simulate, true)
Expand Down