Sha256: 782e84c8f901b1aa0dae863546b1e4683bd34c9acac7b7cce716110355bdeec5

Contents?: true

Size: 703 Bytes

Versions: 9

Compression:

Stored size: 703 Bytes

Contents

require 'spec_helper'

module Deface
  module Actions
    describe InsertBefore do
      include_context "mock Rails.application"
      before { Dummy.all.clear }

      describe "with a single insert_before override defined" do
        before  { Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :insert_after => "ul li:last", :text => "<%= help %>") }
        let(:source) { "<ul><li>first</li><li>second</li><li>third</li></ul>" }

        it "should return modified source" do
          Dummy.apply(source, {:virtual_path => "posts/index"}).gsub("\n", "").should == "<ul><li>first</li><li>second</li><li>third</li><%= help %></ul>"
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/deface-1.0.1/spec/deface/actions/insert_before_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/deface-1.0.1/spec/deface/actions/insert_before_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/deface-1.0.1/spec/deface/actions/insert_before_spec.rb
deface-1.0.1 spec/deface/actions/insert_before_spec.rb
deface-1.0.0 spec/deface/actions/insert_before_spec.rb
deface-1.0.0.rc4 spec/deface/actions/insert_before_spec.rb
deface-1.0.0.rc3 spec/deface/actions/insert_before_spec.rb
deface-1.0.0.rc2 spec/deface/actions/insert_before_spec.rb
deface-1.0.0.rc1 spec/deface/actions/insert_before_spec.rb