Sha256: 63df07b7f42da893793b6d706a502975588f919a249158ea9626121c9df1e2c3
Contents?: true
Size: 718 Bytes
Versions: 9
Compression:
Stored size: 718 Bytes
Contents
require 'spec_helper' module Deface module Actions describe ReplaceContents do include_context "mock Rails.application" before { Dummy.all.clear } describe "with a single insert_after override defined" do before { Deface::Override.new(:virtual_path => "posts/index", :name => "Posts#index", :insert_after => "img.button", :text => "<% help %>") } let(:source) { "<div><img class=\"button\" src=\"path/to/button.png\"></div>" } it "should return modified source" do Dummy.apply(source, {:virtual_path => "posts/index"}).gsub("\n", "").should == "<div><img class=\"button\" src=\"path/to/button.png\"><% help %></div>" end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems