thes/spec/thes_spec.rb

32 lines
970 B
Ruby

require "spec_helper"
RSpec.describe Thes do
let(:nature_html) { File.read('spec/pages/nature.html') }
before {
allow(thes).to receive(:open).and_return(nature_html)
}
let(:thes) { Thes.new('nature') }
subject { thes.call }
it { is_expected.to include('description') }
it { is_expected.to include('essence') }
it { is_expected.to include('humor') }
it { is_expected.to include('attributes') }
it { is_expected.to include('being') }
it { is_expected.to include('complexion') }
it { is_expected.to include('bottom line') }
it { is_expected.to include('name of game') }
it { is_expected.to include('name of tune') }
it { is_expected.to include('nature of beast') }
it { is_expected.to include 'megacosm' }
it { is_expected.to include 'natural history' }
it { is_expected.to include 'noun: character, disposition' }
it { is_expected.to include 'noun: type, kind' }
it { is_expected.to include 'noun: earth, creation' }
end