Sha256: baee49ee3894fb9250acddfc78f43895811f75ceb735d93d065658b1a08704b9
Contents?: true
Size: 911 Bytes
Versions: 2
Compression:
Stored size: 911 Bytes
Contents
require 'spec_helper' RSpec.describe 'Generators' do let(:destination) { Howitzer::BaseGenerator.destination } let(:output) { StringIO.new } subject { file_tree_info(destination) } before do Howitzer::BaseGenerator.logger = output generator_name.new end after { FileUtils.rm_r(destination) } describe 'TasksGenerator' do let(:generator_name) { Howitzer::TasksGenerator } let(:expected_result) do [ {:name=> '/tasks', :is_directory=>true}, {:name=> '/tasks/common.rake', :is_directory=>false, :size=>template_file_size('tasks', 'common.rake')} ] end it { is_expected.to eql(expected_result) } describe 'output' do let(:expected_output) do " * Base rake task generation ... Added 'tasks/common.rake' file\n" end subject { output.string } it { is_expected.to eql(expected_output) } end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
howitzer-1.1.1 | spec/unit/generators/tasks_generator_spec.rb |
howitzer-1.1.0 | spec/unit/generators/tasks_generator_spec.rb |