Sha256: 650c4e36ee7c233fa13944f16be4b09b95822ea113ccff81fd2a87d3d6ed40fd

Contents?: true

Size: 1.29 KB

Versions: 14

Compression:

Stored size: 1.29 KB

Contents

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 "should highlight 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) { Card.gimme! "test css", :type => :css, :content => css }
    let(:create_another_machine_input_card) { Card.gimme! "more test css", :type => :css, :content => css }
    let(:create_machine_card)  { Card.gimme! "style with css+*style", :type => :pointer }
    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

14 entries across 14 versions & 1 rubygems

Version Path
wagn-1.14.8 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.7 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.6 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.5 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.4 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.3 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.2 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.1 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.0 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.0.pre3 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.0.pre2 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.14.0.pre1 mod/03_machines/spec/set/type/css_spec.rb
wagn-1.13.0 spec/mod/standard/set/type/css_spec.rb
wagn-1.13.0.pre2 spec/mods/standard/sets/type/css_spec.rb