Sha256: eb2dfc6d4b7bf32e626f04a94c21472f55cca90e28f0634dd7f48c5537bad24b

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'convert_theme/cli'

describe ConvertTheme::CLI, "execute" do
  before(:each) do
    theme = stub
    ConvertTheme.should_receive(:new).
      with(:template_root => "path/to/app", 
        :content_id => "content_box",
        :index_path => "root.html",
        :template_type => "haml",
        :inside_yields => { :header => '#header h2', :sidebar => '#sidebar' }
      ).
      and_return(theme)
    theme.should_receive(:apply_to).with("path/to/rails_app")
    @stdout = stdout do |stdout_io|
      ConvertTheme::CLI.execute(stdout_io, %w[path/to/app path/to/rails_app content_box
        --index_path=root.html
        --haml
        --inside_yield=header=>#header\ h2
        --inside_yield=sidebar=>#sidebar
      ])
    end
  end
  
  it("parses arguments and run generator") { }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
convert_theme-0.3.0 spec/convert_theme_cli_spec.rb