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) { "" } it "should return modified source" do Dummy.apply(source, {:virtual_path => "posts/index"}).gsub("\n", "").should == "" end end end end end