You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

constantize_spec.rb 441 B

2 years ago
123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'spec_helper'
  3. module Html end
  4. module Cucumber
  5. describe Constantize do
  6. include Constantize
  7. it 'loads pretty formatter' do
  8. clazz = constantize('Cucumber::Formatter::Pretty')
  9. expect(clazz.name).to eq 'Cucumber::Formatter::Pretty'
  10. end
  11. it 'fails to load a made up class' do
  12. expect { constantize('My::MadeUp::ClassName') }.to raise_error(LoadError)
  13. end
  14. end
  15. end

No Description

Contributors (1)