require 'spec_helper' describe Rack::EnvNotifier::BodyInjector do describe 'body tag regex' do let(:regex) { described_class::BODY_TAG_REGEX } subject { regex } it { should be_kind_of(Regexp) } it 'only picks a valid
tag' do expect(regex.match("").to_s).to eq('') expect(regex.match("").to_s).to eq('') expect(regex.match("").to_s).to eq("") end it 'responds nil when no head tag' do expect(regex.match("")).to eq nil end end end