Sha256: 2180fa5b82dc1347fb6e55e768caa7baf140b41251fe9c5c590c73e3faa5eaae

Contents?: true

Size: 890 Bytes

Versions: 3

Compression:

Stored size: 890 Bytes

Contents

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

describe InstallTheme::CLI, "execute" do
  before(:each) do
    theme = stub
    InstallTheme.should_receive(:new).
      with(:template_root => "path/to/app", 
        :rails_root => "path/to/rails_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_target)
    @stdout = stdout do |stdout_io|
      InstallTheme::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

3 entries across 3 versions & 1 rubygems

Version Path
install_theme-0.6.0 spec/install_theme_cli_spec.rb
install_theme-0.5.2 spec/install_theme_cli_spec.rb
install_theme-0.5.1 spec/install_theme_cli_spec.rb