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