Sha256: b20e9a9ce9daa8ec41f255ad6d9feb77768bea2021bc2e5f4d2e626a4be18ea3

Contents?: true

Size: 854 Bytes

Versions: 106

Compression:

Stored size: 854 Bytes

Contents

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

describe Thor::Shell::HTML do
  def shell
    @shell ||= Thor::Shell::HTML.new
  end

  describe "#say" do
    it "set the color if specified" do
      $stdout.should_receive(:puts).with('<span style="color: green;">Wow! Now we have colors!</span>')
      shell.say "Wow! Now we have colors!", :green
    end

    it "does not use a new line even with colors" do
      $stdout.should_receive(:print).with('<span style="color: green;">Wow! Now we have colors! </span>')
      shell.say "Wow! Now we have colors! ", :green
    end
  end

  describe "#say_status" do
    it "uses color to say status" do
      $stdout.should_receive(:puts).with('<strong><span style="color: red;">    conflict</span></strong>  README')
      shell.say_status :conflict, "README", :red
    end
  end

end

Version data entries

106 entries across 101 versions & 12 rubygems

Version Path
arcabouco-0.2.13 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.7.5 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.7.4 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.7.3 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/thor-0.14.6/spec/shell/html_spec.rb
mango-0.7.0 vendor/bundler/ruby/2.0.0/gems/thor-0.14.6/spec/shell/html_spec.rb
wijet-thor-0.14.10 spec/shell/html_spec.rb
classiccms-0.7.2 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.7.1 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.7.0 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
wijet-thor-0.14.9 spec/shell/html_spec.rb
classiccms-0.6.9 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.8 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.7 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.6 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.5 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.4 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.3 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.2 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb
classiccms-0.6.1 vendor/bundle/gems/thor-0.14.6/spec/shell/html_spec.rb