Sha256: 748c02fbdd4dccaadf0379ff0051e57db548327f7bedd63cf2e6ed24cbc87ed8
Contents?: true
Size: 755 Bytes
Versions: 8
Compression:
Stored size: 755 Bytes
Contents
require "spec_helper" describe "Simple::Httpd::Helpers" do H = Simple::Httpd::Helpers describe ".filtered_stacktrace" do def some_stacktrace(depth = 1) if depth == 0 caller else some_stacktrace(depth-1) end end def filtered_stacktrace H.filtered_stacktrace(some_stacktrace) end it "removes .rvm lines" do actual = filtered_stacktrace expect(actual.grep(/lines removed/).count).to eq(1) expect(actual.grep(/helpers_spec/).count).to be > 1 expect(actual.grep(/some_stacktrace/).count).to eq(1) end it "shortens paths" do source_path = filtered_stacktrace.grep(/helpers_spec/).first expect(source_path).to start_with("./") end end end
Version data entries
8 entries across 8 versions & 1 rubygems