spec/support/shared_examples/a_serializer.rb in rambling-trie-2.3.1 vs spec/support/shared_examples/a_serializer.rb in rambling-trie-2.4.0

- old
+ new

@@ -3,11 +3,11 @@ shared_examples_for 'a serializer' do subject(:serializer) { described_class.new } let(:trie) { Rambling::Trie.create } let(:tmp_path) { File.join ::SPEC_ROOT, 'tmp' } - let(:filepath) { File.join tmp_path, "trie-root.#{format}" } + let(:filepath) { File.join tmp_path, "trie-root.#{file_format}" } let(:content) { trie.root } before do trie.concat %w(a few words to validate that load and dump are working) FileUtils.rm_f filepath @@ -50,10 +50,10 @@ expect(serializer.load filepath).to eq content end it "loads a compressed=#{compress_value} object" do loaded = serializer.load filepath - expect(loaded.compressed?).to be compress_value if :file != format + expect(loaded.compressed?).to be compress_value unless :file == file_format end end end end end