Sha256: 26b33171ef2ecc3b9b5fbfab142062a86a0cdbec9876918fbc12bb9fe7b52632

Contents?: true

Size: 1.39 KB

Versions: 26

Compression:

Stored size: 1.39 KB

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::Type::Css do
  let(:css)                    { "#box { display: block }" }
  let(:compressed_css)         { "#box{display:block}\n" }
  let(:changed_css)            { "#box { display: inline }" }
  let(:compressed_changed_css) { "#box{display:inline}\n" }

  it "highlights code" do
    Card::Auth.as_bot do
      css_card = Card.create! name: "tmp css", type_code: "css",
                              content: "p { border: 1px solid black; }"
      assert_view_select css_card.format.render_core, "div[class=CodeRay]"
    end
  end

  it_behaves_like "machine input"  do
    let(:create_machine_input_card) do
      Card.gimme! "test css", type: :css, content: css
    end
    let(:create_another_machine_input_card) do
      Card.gimme! "more test css", type: :css, content: css
    end
    let(:create_machine_card) do
      Card.gimme! "style with css+*style", type: :pointer
    end
    let(:card_content) do
      { in:         css,         out:         compressed_css,
        changed_in: changed_css, changed_out: compressed_changed_css }
    end
  end

  it_behaves_like "content machine", that_produces: :css do
    let(:machine_card) { Card.gimme! "test css", type: :css, content: css }
    let(:card_content) do
      { in:         css,         out:         compressed_css,
        changed_in: changed_css, changed_out: compressed_changed_css }
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
card-1.94.1 mod/machines/spec/set/type/css_spec.rb
card-1.94.0 mod/machines/spec/set/type/css_spec.rb
card-1.93.13 mod/machines/spec/set/type/css_spec.rb
card-1.93.12 mod/machines/spec/set/type/css_spec.rb
card-1.93.11 mod/machines/spec/set/type/css_spec.rb
card-1.93.10 mod/machines/spec/set/type/css_spec.rb
card-1.93.9 mod/machines/spec/set/type/css_spec.rb
card-1.93.8 mod/machines/spec/set/type/css_spec.rb
card-1.93.7 mod/machines/spec/set/type/css_spec.rb
card-1.93.6 mod/machines/spec/set/type/css_spec.rb
card-1.93.5 mod/machines/spec/set/type/css_spec.rb
card-1.93.4 mod/machines/spec/set/type/css_spec.rb
card-1.93.3 mod/machines/spec/set/type/css_spec.rb
card-1.93.2 mod/machines/spec/set/type/css_spec.rb
card-1.93.1 mod/machines/spec/set/type/css_spec.rb
card-1.93.0 mod/machines/spec/set/type/css_spec.rb
card-1.92.2 mod/machines/spec/set/type/css_spec.rb
card-1.92.1 mod/machines/spec/set/type/css_spec.rb
card-1.92 mod/machines/spec/set/type/css_spec.rb
card-1.91 mod/machines/spec/set/type/css_spec.rb