Sha256: 98677e9bfdcc0c6b6537c6eea56e91ddff2ff8ac756a57d8f605b62a694b683c
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
require 'spec_helper' class CupcakinatorSpecFoo include Cupcakinator cupcakinate method: 'config', file: 'config.yml' end class CupcakinatorSpecBar < CupcakinatorSpecFoo cupcakinate method: 'bar_config' end class CupcakinatorSpecBaz include Cupcakinator cupcakinate method: 'baz_config' end describe Cupcakinator do context 'inheritence' do it "parent should not have child's options" do CupcakinatorSpecFoo._cupcakinator_options[:method].should == 'config' end it "child should not have parent's options" do CupcakinatorSpecBar._cupcakinator_options[:method].should == 'bar_config' end end context 'multiple uses' do it "should exist separately per invocation" do CupcakinatorSpecBaz._cupcakinator_options[:method].should_not eq CupcakinatorSpecFoo._cupcakinator_options[:method] end end context 'localization' do it 'should have loaded the locales file' do I18n.t('cupcakinator.error.deprecation.include_base').should =~ /don't include Cupcakinator::Base directly/ end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cupcakinator-1.1.2 | spec/cupcakinator_spec.rb |