spec/integration/yard/arstotzka/crawler_spec.rb in arstotzka-1.1.0 vs spec/integration/yard/arstotzka/crawler_spec.rb in arstotzka-1.2.0

- old
+ new

@@ -3,15 +3,16 @@ require 'spec_helper' describe Arstotzka::Crawler do describe 'yard' do subject(:crawler) do - described_class.new(keys: keys, **options) + described_class.new(full_path: full_path, **options) end - let(:options) { {} } - let(:keys) { %w[person information first_name] } + let(:options) { {} } + let(:keys) { %w[person information first_name] } + let(:full_path) { keys.join('.') } let(:hash) do { person: { 'information' => { 'firstName' => 'John' @@ -62,10 +63,10 @@ end end context 'when block is given' do subject(:crawler) do - described_class.new(keys: keys, **options) { |value| value&.to_sym } + described_class.new(full_path: full_path, **options) { |value| value&.to_sym } end it 'returns the post processed values' do expect(crawler.value(hash)).to eq([[:Rakhar]]) end