Sha256: 20a51ed54c04cc884cc4034aedb4202c386a71acd14a08483a724c5e1a69a509
Contents?: true
Size: 670 Bytes
Versions: 6
Compression:
Stored size: 670 Bytes
Contents
require 'spec_helper' require 'wordlist/operators/concat' describe Wordlist::Operators::Concat do let(:left) { %w[foo bar] } let(:right) { %w[baz qux] } subject { described_class.new(left,right) } describe "#each" do context "when given a block" do it "must yield each word from both wordlists" do expect { |b| subject.each(&b) }.to yield_successive_args(*(left + right)) end end context "when not given a block" do it "must return an Enumerator for the #each" do expect(subject.each).to be_kind_of(Enumerator) expect(subject.each.to_a).to eq(left + right) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems