Sha256: fe10ccb484c3921c8b7f7e541a4adfef1e682956f1ad8419974c97d2e211b3d4

Contents?: true

Size: 614 Bytes

Versions: 1

Compression:

Stored size: 614 Bytes

Contents

require 'spec_helper'

describe TinyRails::Commands::New do
  before do
    FileUtils.rm_rf '.tmp' if Dir.exist?('.tmp')
    @original_wd = Dir.pwd
  end

  after { FileUtils.cd @original_wd }

  context 'scaffold' do
    subject do
      output = capture(:stdout) { described_class.start(['.tmp']) }
      output.gsub(/\e\[(\d+)m/, '')
    end

    %w(
      .gitignore
      Gemfile
      boot.rb
      tiny_rails_controller.rb
      index.html.erb
      server
      config.ru
    ).each do |file|
      it { should =~ /create\s+#{Regexp.escape file}/ }
    end

    it { should =~ /chmod\s+server/ }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tiny-rails-0.0.2 spec/commands/new_spec.rb