spec/error_spec.rb in errawr-1.0.0 vs spec/error_spec.rb in errawr-1.1.0

- old
+ new

@@ -1,13 +1,8 @@ require 'spec_helper' describe Errawr::Error do - before(:each) do - I18n.load_path += Dir.glob('spec/support/en.yml') - I18n.reload! - end - it 'should return a key of :unknown if no key is set' do error = Errawr::Error.new error.key.should == :unknown end @@ -26,8 +21,8 @@ error.message.should == 'An unknown error has occurred' end it 'should insert custom values into the context if I18n value is a hash' do error = Errawr::Error.new(:error_hash) - error.context[:name].should == 'error_name' + error.metadata[:name].should == 'error_name' end end \ No newline at end of file