Sha256: e57cf9cb74ce0290571384f12738a5c29b79ecbbbc9d1ef389de71ede68d0210

Contents?: true

Size: 523 Bytes

Versions: 6

Compression:

Stored size: 523 Bytes

Contents

require 'spec_helper'
require 'reek/cli/help_command'

include Reek::Cli

describe HelpCommand do
  before :each do
    @text = 'Piece of interesting text'
    @cmd = HelpCommand.new(@text)
    @view = double('view').as_null_object
    @view.should_not_receive(:report_smells)
  end

  it 'displays the correct text on the view' do
    @view.should_receive(:output).with(@text)
    @cmd.execute(@view)
  end

  it 'tells the view it succeeded' do
    @view.should_receive(:report_success)
    @cmd.execute(@view)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
reek-1.3.8 spec/reek/cli/help_command_spec.rb
reek-1.3.7 spec/reek/cli/help_command_spec.rb
reek-1.3.6 spec/reek/cli/help_command_spec.rb
reek-1.3.5 spec/reek/cli/help_command_spec.rb
reek-1.3.4 spec/reek/cli/help_command_spec.rb
reek-1.3.3 spec/reek/cli/help_command_spec.rb