Created
May 17, 2016 11:36
-
-
Save dncrht/31b3ae37c19298506298dd4479bf66ba to your computer and use it in GitHub Desktop.
Using strip_heredoc outside Rails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
require 'active_support/core_ext/string/strip' | |
class MyClass | |
def call | |
"this is\na pretty\n(¯`·._.·[ string ]·._.·´¯)\n" | |
end | |
end | |
describe MyClass do | |
it 'returns the expected string' do | |
my = MyClass | |
expect(subject.call).to eq <<-eos.strip_heredoc | |
this is | |
a pretty | |
(¯`·._.·[ string ]·._.·´¯) | |
eos | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment