Sha256: caac8465bdc07253ac800c43ce1a0dc26f5b63a13f64d9862e2f6db99c5d5791

Contents?: true

Size: 1.09 KB

Versions: 13

Compression:

Stored size: 1.09 KB

Contents

require "spec_helper"

describe EditMode::EditModeHelpers do
  
  describe "#edit_mode_group_span" do
   
    it "should generate the corresponding span" do
      nokogiri = Nokogiri::HTML.parse( edit_mode_group_span { "<p>This text is inside an edit_mode_group.</p>" } )
      span = nokogiri.css( "span" )
      span.text.should == "<p>This text is inside an edit_mode_group.</p>"
    end

  end

  describe "#show_only_in_edit_mode_span" do
   
    it "should generate the corresponding span" do
      nokogiri = Nokogiri::HTML.parse( show_only_in_edit_mode_span { "<p>This text is shown only in edit mode.</p>" } )
      span = nokogiri.css( "span" )
      span.text.should == "<p>This text is shown only in edit mode.</p>"
    end

  end

  describe "#do_not_show_in_edit_mode_span" do
   
    it "should generate the corresponding span" do
      nokogiri = Nokogiri::HTML.parse( do_not_show_in_edit_mode_span { "<p>This text is shown only when not in edit mode.</p>" } )
      span = nokogiri.css( "span" )
      span.text.should == "<p>This text is shown only when not in edit mode.</p>"
    end

  end


end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
edit_mode-1.0.5 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-1.0.4 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-1.0.3 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-1.0.2 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-1.0.1 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-1.0.0 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.9 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.8 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.7 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.6 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.5 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.4 spec/helpers/edit_mode_helpers_spec.rb
edit_mode-0.0.3 spec/helpers/edit_mode_helpers_spec.rb