Sha256: 879289dc537a3104f444b35de4374ce1e4a69164acf95ba405116feaf8e23b85

Contents?: true

Size: 696 Bytes

Versions: 3

Compression:

Stored size: 696 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

require 'reek/version_command'

include Reek

describe VersionCommand do
  before :each do
    @text = 'Piece of interesting text'
    @cmd = VersionCommand.new(@text)
    @view = mock('view', :null_object => true)
    @view.should_not_receive(:report_smells)
  end

  it 'displays the text on the view' do
    @view.should_receive(:output).with(/#{@text}/)
    @cmd.execute(@view)
  end

  it 'displays the Reek version on the view' do
    @view.should_receive(:output).with(/#{Reek::VERSION}/)
    @cmd.execute(@view)
  end

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
reek-1.2.6 spec/reek/version_command_spec.rb
reek-1.2.5 spec/reek/version_command_spec.rb
reek-1.2.4 spec/reek/version_command_spec.rb