Sha256: d61840a0d88bcda8f17d0f891c5aee589d8bd82cf6046014f47bae1c62bae6b7

Contents?: true

Size: 1.4 KB

Versions: 16

Compression:

Stored size: 1.4 KB

Contents

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

RSpec.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

16 entries across 16 versions & 1 rubygems

Version Path
card-1.98.0 mod/machines/spec/set/type/css_spec.rb
card-1.97.0.1 mod/machines/spec/set/type/css_spec.rb
card-1.97.0 mod/machines/spec/set/type/css_spec.rb
card-1.96.8 mod/machines/spec/set/type/css_spec.rb
card-1.96.7 mod/machines/spec/set/type/css_spec.rb
card-1.96.6 mod/machines/spec/set/type/css_spec.rb
card-1.96.5 mod/machines/spec/set/type/css_spec.rb
card-1.96.4 mod/machines/spec/set/type/css_spec.rb
card-1.96.3 mod/machines/spec/set/type/css_spec.rb
card-1.96.2 mod/machines/spec/set/type/css_spec.rb
card-1.96.1 mod/machines/spec/set/type/css_spec.rb
card-1.96.0 mod/machines/spec/set/type/css_spec.rb
card-1.95.3 mod/machines/spec/set/type/css_spec.rb
card-1.95.2 mod/machines/spec/set/type/css_spec.rb
card-1.95.1 mod/machines/spec/set/type/css_spec.rb
card-1.95.0 mod/machines/spec/set/type/css_spec.rb