Sha256: 324e2e336f176f851e42528507d3a8cc643b46342c90792c3315758f6711b7ad

Contents?: true

Size: 1.09 KB

Versions: 6

Compression:

Stored size: 1.09 KB

Contents

require 'test_helper'

module Vedeu

  module CLI

    describe Main do

      let(:described) { Vedeu::CLI::Main }
      let(:instance)  { described.new }

      describe '#new' do
        let(:_name) { 'app_name' }

        before {
          instance.stubs(:say)
          Vedeu::Generator::Application.stubs(:generate).returns('')
        }

        subject { instance.new(_name) }

        it {
          Vedeu::Generator::Application.expects(:generate).with(_name)
          subject
        }
      end

      describe '#view' do
        let(:_name) { 'view_name' }

        before {
          instance.stubs(:say)
          Vedeu::Generator::View.stubs(:generate).returns('')
        }

        subject { instance.view(_name) }

        it {
          Vedeu::Generator::View.expects(:generate).with(_name)
          subject
        }
      end

      describe '#version' do
        before { instance.stubs(:say) }

        subject { instance.version }

        it {
          instance.expects(:say).with("vedeu #{Vedeu::VERSION}")
          subject
        }
      end

    end # Main

  end # CLI

end # Vedeu

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.5.6 test/lib/vedeu/cli/main_test.rb
vedeu-0.5.5 test/lib/vedeu/cli/main_test.rb
vedeu-0.5.4 test/lib/vedeu/cli/main_test.rb
vedeu-0.5.3 test/lib/vedeu/cli/main_test.rb
vedeu-0.5.2 test/lib/vedeu/cli/main_test.rb
vedeu-0.5.1 test/lib/vedeu/cli/main_test.rb