Sha256: 2d5abc88e1914c4193f210702020925698b12d7424fa30c92ca8a5ede1e61e64
Contents?: true
Size: 1.34 KB
Versions: 1
Compression:
Stored size: 1.34 KB
Contents
describe "girls_checker" do # rubocop:disable RSpec/DescribeClass config_files = Pathname.glob("#{spec_dir}/../config/girls/*.yml") config_files.each do |config_file| describe "config/girls/#{config_file.basename}" do girls = Rubicure::Concerns::Util.load_yaml_file(config_file) girls.each do |girl_name, girl| describe girl_name do describe "#transform_message" do subject { girl["transform_message"] } it { should_not end_with("\n") } end describe "#attack_messages" do it "does not all end with(\\n)" do aggregate_failures do Array(girl["attack_messages"]).each do |attack_message| # NOTE: `expect().not_to all( matcher )` is not supported. expect(attack_message).not_to end_with("\n") end end end end describe "#birthday" do context "has birthday", if: girl.has_key?("birthday") do birthday = girl["birthday"] it { expect(birthday).not_to be_blank } it "'#{birthday}' is valid date" do ymd = "#{Date.today.year}/#{birthday}" expect(Date.parse(ymd)).to be_a Date end end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubicure-3.0.0 | spec/config/girls_checker_spec.rb |