<commit_before>require 'spec_helper'

module Pact
  module Consumption
    describe Response do

      subject { Response.new({ woot: /x/, britney: 'britney', nested: { foo: /bar/, baz: 'qux' }, array: ['first', /second/]} ) }

      describe "reify" do

        it "converts regexes into real data" do
          subject.reify[:woot].should == 'x'
        end

        it "passes strings through" do
          subject.reify[:britney].should == 'britney'
        end

        it "handles nested hashes" do
          subject.reify[:nested].should == { foo: 'bar', baz: 'qux' }
        end

        it "handles arrays" do
          subject.reify[:array].should == ['first', 'second']
        end

      end

    end
  end
end<commit_msg>Use 'expect' syntax in specs<commit_after>require 'spec_helper'

module Pact
  module Consumption
    describe Response do

      subject do
        Response.new({
          woot: /x/, britney: 'britney',
          nested: { foo: /bar/, baz: 'qux' },
          array: ['first', /second/]
        })
      end

      describe "reify" do

        it "converts regexes into real data" do
          expect(subject.reify[:woot]).to eql 'x'
        end

        it "passes strings through" do
          expect(subject.reify[:britney]).to eql 'britney'
        end

        it "handles nested hashes" do
          expect(subject.reify[:nested]).to eql({ foo: 'bar', baz: 'qux' })
        end

        it "handles arrays" do
          expect(subject.reify[:array]).to eql ['first', 'second']
        end

      end

    end
  end
end
{'fraction_non_alphanumeric': 0.12572161642078256, 'fraction_numerical': 0.0, 'mean_word_length': 1.9657794676806084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3422274', 'n_tokens_mistral': 498, 'n_tokens_neox': 480, 'n_words': 143}