Sha256: c9dd48181d985551c58928d58f5b755c631fbf943a5aa1cb9f8236144c11c593
Contents?: true
Size: 672 Bytes
Versions: 8
Compression:
Stored size: 672 Bytes
Contents
require 'spec_helper' require 'approvals/utilities/scrubber' describe Approvals::Scrubber do describe "defaults" do let(:path) { File.expand_path('.') } subject { Approvals::Scrubber.new("I am currently at #{path}") } its(:to_s) { should eq("I am currently at {{current_dir}}") } it "unscrubs" do subject.unscrub.should eq("I am currently at #{path}") end it "unscrubs any old string" do subject.unscrub("Hoy, where's {{current_dir}}?").should eq("Hoy, where's #{path}?") end end it "overrides default hash" do Approvals::Scrubber.new("oh, my GAWD", {"deity" => "GAWD"}).to_s.should eq('oh, my {{deity}}') end end
Version data entries
8 entries across 8 versions & 1 rubygems